https://github.com/ipfans/defaults
Fill default values of struct.
https://github.com/ipfans/defaults
Last synced: 12 months ago
JSON representation
Fill default values of struct.
- Host: GitHub
- URL: https://github.com/ipfans/defaults
- Owner: ipfans
- License: mit
- Created: 2021-03-05T11:14:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-05T11:27:29.000Z (over 5 years ago)
- Last Synced: 2023-03-22T19:32:29.756Z (over 3 years ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# defaults
Fill default values of struct.
## How to Use
```go
type V struct {
I int `defaults:"1"`
}
func main() {
var v V
defaults.Default(&v)
}
```