# README
go-stringify
Description
go-stringify is a simple library for generating a stringer that converts literals to strings, converts map keys to strings, or converts a slice to a slice of strings. go-stringify is used by go-simple-serializer.
Usage
Go
You can import go-stringify as a library with:
import (
"github.com/spatialcurrent/go-stringify/pkg/stringify"
)
The easiest pattern is to use the NewStringer(noDataValue string, decimal bool, lower bool, upper bool)
constructor to create a stringer function.
stringer := NewStringer("-", true, false, false)
...
str := stringer(obj)
See stringify in the docs for information on how to use Go API.
Testing
To run Go tests using make test_go
or (bash scripts/test.sh
), which runs unit tests, go vet
, go vet with shadow
, errcheck, staticcheck, and misspell.
Contributing
Spatial Current, Inc. is currently accepting pull requests for this repository. We'd love to have your contributions! Please see Contributing.md for how to get started.
License
This work is distributed under the MIT License. See LICENSE file.