https://github.com/spatialcurrent/go-fit
Library to fit data structures to their underlying types.
https://github.com/spatialcurrent/go-fit
go golang
Last synced: 7 days ago
JSON representation
Library to fit data structures to their underlying types.
- Host: GitHub
- URL: https://github.com/spatialcurrent/go-fit
- Owner: spatialcurrent
- License: mit
- Created: 2020-02-02T14:35:57.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2022-03-08T15:48:46.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T00:33:39.896Z (over 1 year ago)
- Topics: go, golang
- Language: Go
- Homepage: https://pkg.go.dev/github.com/spatialcurrent/go-fit
- Size: 13.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
[](https://circleci.com/gh/spatialcurrent/go-fit/tree/main)
[](https://goreportcard.com/report/github.com/spatialcurrent/go-fit)
[](https://pkg.go.dev/github.com/spatialcurrent/go-fit)
[](https://github.com/spatialcurrent/go-fit/blob/master/LICENSE)
# go-fit
# Description
**go-fit** is a library to fit data structures to their underlying types.
# Usage
**Go**
You can import **go-fit** as a library with:
```go
import (
"github.com/spatialcurrent/go-fit/pkg/fit"
)
```
The easiest pattern is to use the `fit.Fit(in interface{}) interface{}` function.
```go
fittedObject := fit.Fit(obj)
```
See [fit](https://pkg.go.dev/github.com/spatialcurrent/go-fit/pkg/fit) in the docs for information on how to use Go API.
# Testing
To run Go tests use `make test_go` or (`bash scripts/test.sh`), which runs unit tests, `go vet`, `go vet with shadow`, [errcheck](https://github.com/kisielk/errcheck), [staticcheck](https://staticcheck.io/), and [misspell](https://github.com/client9/misspell).
# Contributing
[Spatial Current, Inc.](https://spatialcurrent.io) is currently accepting pull requests for this repository. We'd love to have your contributions! Please see [Contributing.md](https://github.com/spatialcurrent/go-fit/blob/main/CONTRIBUTING.md) for how to get started.
# License
This work is distributed under the **MIT License**. See **LICENSE** file.