go-try-get

module
v0.0.0-...-b29289e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2021 License: MIT

README

CircleCI Go Report Card PkgGoDev License

go-try-get

Description

go-try-get aka (GTG) is a package that wraps around the reflect package to provide a standard abstraction layer for getting values by name from objects (structs, maps, and single-value "property" functions). GTG is used by:

For example, with GTG, you can provide a single pathways for an API to process structs and maps, allowing automated structured input from systems, as well as user-based input unmarshaled from JSON.

Usage

Go

You can import go-try-get as a library with:

import (
  "github.com/spatialcurrent/go-try-get/pkg/gtg"
)

See gtg in the docs for information on how to use Go API.

Testing

To run Go tests using make test 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.

Directories

Path Synopsis
pkg
gtg
Package gtg wraps around the reflect package to provide a standard abstraction layer for getting values by name from objects (structs, maps, and single-value "property" functions).
Package gtg wraps around the reflect package to provide a standard abstraction layer for getting values by name from objects (structs, maps, and single-value "property" functions).
tools
Package tools includes tools used during development, testing, and building.
Package tools includes tools used during development, testing, and building.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL