Skip to content

Commit

Permalink
Merge pull request #24 from paulmach/pm/test-action
Browse files Browse the repository at this point in the history
add github action to run tests
  • Loading branch information
paulmach authored Jul 8, 2023
2 parents 469375d + 663b435 commit 1bf186a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.19'

- name: Run build
run: go build .

- name: Run vet & lint
run: |
go vet .
- name: Run tests
run: go test -v ./...
20 changes: 3 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,12 @@
go.geojson
==========
# 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)

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

### Important
This package is best for lightweight interaction with GeoJSON. If you want to actually do
stuff with the geometry take a look at [orb/geojson](https://github.com/paulmach/orb/tree/master/geojson) which
decodes the geometries into [orb](https://github.com/paulmach/orb) types which you can do all sorts of things with.

#### To install

go get github.com/paulmach/go.geojson

#### To use, imports as package name `geojson`:

import "github.com/paulmach/go.geojson"

[![Build Status](https://travis-ci.org/paulmach/go.geojson.svg?branch=master)](https://travis-ci.org/paulmach/go.geojson)
[![Godoc Reference](https://godoc.org/github.com/paulmach/go.geojson?status.svg)](https://godoc.org/github.com/paulmach/go.geojson)
### Deprecated, use [orb/geojson](https://github.com/paulmach/orb/tree/master/geojson)
The [orb](https://github.com/paulmach/orb) package, and its subpackages, provide all the features here and more.

## Examples

Expand Down

0 comments on commit 1bf186a

Please sign in to comment.