Skip to content

Commit 1bf186a

Browse files
authored
Merge pull request #24 from paulmach/pm/test-action
add github action to run tests
2 parents 469375d + 663b435 commit 1bf186a

File tree

2 files changed

+31
-17
lines changed

2 files changed

+31
-17
lines changed

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Setup Go
16+
uses: actions/setup-go@v2
17+
with:
18+
go-version: '1.19'
19+
20+
- name: Run build
21+
run: go build .
22+
23+
- name: Run vet & lint
24+
run: |
25+
go vet .
26+
27+
- name: Run tests
28+
run: go test -v ./...

README.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
1-
go.geojson
2-
==========
1+
# go.geojson [![CI](https://github.com/paulmach/go.geojson/workflows/CI/badge.svg)](https://github.com/paulmach/go.geojson/actions?query=workflow%3ACI+event%3Apush) [![Godoc Reference](https://godoc.org/github.com/paulmach/go.geojson?status.svg)](https://godoc.org/github.com/paulmach/go.geojson)
32

43
Go.geojson is a package for **encoding and decoding** [GeoJSON](http://geojson.org/) into Go structs.
54
Supports both the [json.Marshaler](http://golang.org/pkg/encoding/json/#Marshaler) and [json.Unmarshaler](http://golang.org/pkg/encoding/json/#Unmarshaler)
65
interfaces as well as [sql.Scanner](http://golang.org/pkg/database/sql/#Scanner) for directly scanning PostGIS query results.
76
The package also provides helper functions such as `UnmarshalFeatureCollection`, `UnmarshalFeature` and `UnmarshalGeometry`.
87

9-
### Important
10-
This package is best for lightweight interaction with GeoJSON. If you want to actually do
11-
stuff with the geometry take a look at [orb/geojson](https://github.com/paulmach/orb/tree/master/geojson) which
12-
decodes the geometries into [orb](https://github.com/paulmach/orb) types which you can do all sorts of things with.
13-
14-
#### To install
15-
16-
go get github.com/paulmach/go.geojson
17-
18-
#### To use, imports as package name `geojson`:
19-
20-
import "github.com/paulmach/go.geojson"
21-
22-
[![Build Status](https://travis-ci.org/paulmach/go.geojson.svg?branch=master)](https://travis-ci.org/paulmach/go.geojson)
23-
[![Godoc Reference](https://godoc.org/github.com/paulmach/go.geojson?status.svg)](https://godoc.org/github.com/paulmach/go.geojson)
8+
### Deprecated, use [orb/geojson](https://github.com/paulmach/orb/tree/master/geojson)
9+
The [orb](https://github.com/paulmach/orb) package, and its subpackages, provide all the features here and more.
2410

2511
## Examples
2612

0 commit comments

Comments
 (0)