Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tenntenn/gpath
gpath is a Go package to access a field by a path using reflect pacakge
https://github.com/tenntenn/gpath
golang reflect static-analysis
Last synced: about 1 month ago
JSON representation
gpath is a Go package to access a field by a path using reflect pacakge
- Host: GitHub
- URL: https://github.com/tenntenn/gpath
- Owner: tenntenn
- License: mit
- Created: 2017-05-24T06:24:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-04T08:31:39.000Z (over 7 years ago)
- Last Synced: 2024-08-03T15:06:07.593Z (5 months ago)
- Topics: golang, reflect, static-analysis
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 40
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - gpath - gpath is a Go package to access a field by a path using reflect pacakge - ★ 25 (Utilities)
- awesome-go-extra - gpath - 05-24T06:24:18Z|2017-06-04T08:31:39Z| (Utilities / Fail injection)
README
# gpath [![Go Documentation](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)][godoc] [![Travis](https://img.shields.io/travis/tenntenn/gpath.svg?style=flat-square)][travis] [![Go Report Card](https://goreportcard.com/badge/github.com/tenntenn/gpath)](https://goreportcard.com/report/github.com/tenntenn/gpath) [![codecov](https://codecov.io/gh/tenntenn/gpath/branch/master/graph/badge.svg)](https://codecov.io/gh/tenntenn/gpath)
[godoc]: http://godoc.org/github.com/tenntenn/gpath
[travis]: https://travis-ci.org/tenntenn/gpath`gpath` is a Go package to access a field by a path using `reflect` pacakge.
A path is represented by a Go's expression such as `A.B.C[0]`.
You can use selector and index expressions into a path.See usage and example in [GoDoc](https://godoc.org/github.com/tenntenn/gpath).
*NOTE*: This package is experimental and may make backward-incompatible changes.
## Install
Use go get:
```
$ go get github.com/tenntenn/gpath
```## Usage
All usage are described in [GoDoc](https://godoc.org/github.com/tenntenn/gpath).
[mercari/go-httpdoc](https://github.com/mercari/go-httpdoc) is a good example for gpath.