Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
30 Days Of Javascript | 36,212 | a day ago | 1 | January 25, 2022 | 251 | JavaScript | ||||
30 days of JavaScript programming challenge is a step-by-step guide to learn JavaScript programming language in 30 days. This challenge may take more than 100 days, please just follow your own pace. These videos may help too: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw | ||||||||||
Httpie | 27,856 | 1,645 | 42 | 10 days ago | 55 | May 06, 2022 | 146 | bsd-3-clause | Python | |
🥧 HTTPie for Terminal — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. | ||||||||||
Cli | 20,218 | 3,070 | 3,594 | 13 hours ago | 137 | September 11, 2022 | 46 | mit | Go | |
A simple, fast, and fun package for building command line apps in Go | ||||||||||
Fx | 16,283 | 11 | 16 | a month ago | 47 | September 15, 2020 | 22 | mit | Go | |
Terminal JSON viewer | ||||||||||
Http Prompt | 8,717 | 7 | 1 | a month ago | 24 | March 05, 2021 | 53 | mit | Python | |
An interactive command-line HTTP and API testing client built on top of HTTPie featuring autocomplete, syntax highlighting, and more. https://twitter.com/httpie | ||||||||||
Yq | 8,695 | 43 | 5 days ago | 10 | February 06, 2020 | 74 | mit | Go | ||
yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor | ||||||||||
Miller | 7,755 | a day ago | 64 | March 31, 2022 | 95 | other | Go | |||
Miller is like awk, sed, cut, join, and sort for name-indexed data such as CSV, TSV, and tabular JSON | ||||||||||
Structured Text Tools | 6,672 | a month ago | 15 | |||||||
A list of command line tools for manipulating structured text data | ||||||||||
Visidata | 6,583 | 5 | 5 | 11 days ago | 48 | December 16, 2021 | 81 | gpl-3.0 | Python | |
A terminal spreadsheet multitool for discovering and arranging data | ||||||||||
Fq | 6,580 | 12 hours ago | 96 | August 25, 2022 | 40 | other | Go | |||
jq for binary formats - tool, language and decoders for working with binary and text formats |
[Archived] This repository has been archived,See sandwich-go/xconf instead.
Values are resolved with the following priorities (lowest to highest):
type TestOptions struct {
Hosts []string `flag:"hosts" cfg:"hosts" default:"127.0.0.0,127.0.0.1"`
}
flag
is the name passed from the command line.cfg
is the name used in config files.default
is the default valueIf do not define flag
tag, flag
will be snake case of the fild name.
If do not define cfg
tag, cfg
value will be flag
value.
For example, flag and cfg will be http_address.
HTTPAddress string
package main
import "github.com/timestee/goconf"
type TestOptions struct {
goconf.AutoOptions
HTTPAddress string `default:"0.0.0.0:0000"`
Hosts []string `flag:"hosts" cfg:"hosts" default:"127.0.0.0,127.0.0.1"`
LogLevel int `default:"3"`
BoolVar bool `default:"false"`
}
func main() {
ops := &TestOptions{}
goconf.MustResolve(ops,"conf_1.toml","conf_2.toml")
}
go run main.go --log_level=1
The output will be:
[Config] auto flag succ, name: _auto_conf_files_ val:
[Config] auto flag succ, name: http_address val: 0.0.0.0:0000
[Config] auto flag fail, name: hosts val: 127.0.0.0,127.0.0.1 err: type not support []string
[Config] auto flag succ, name: log_level val: 3
[Config] auto flag succ, name: bool_var val: false
[Config] file: [conf_1.toml conf_2.toml]
[Config] load: conf_1.toml
[Config] load: conf_2.toml
[Config]
{
"AutoConfFiles": "",
"HTTPAddress": "127.0.0.1:2",
"Hosts": [
"10.0.61.29",
"10.0.61.30",
"10.0.61.31",
"10.0.61.32"
],
"LogLevel": 1,
"BoolVar": true
}
package main
import "github.com/timestee/goconf"
type TestOptions struct {
goconf.AutoOptions
HTTPAddress string `default:"0.0.0.0:0000"`
Hosts []string `flag:"hosts" cfg:"hosts" default:"127.0.0.0,127.0.0.1"`
LogLevel int `default:"3"`
BoolVar bool `default:"false"`
}
func main() {
ops := &TestOptions{}
// conf_3 inherit from conf_1 and conf_2
goconf.MustResolve(ops,"conf_3.toml")
}
go run main.go --http_address=0.0.0.0:1111111
The output will be:
[Config] auto flag succ, name: _auto_conf_files_ val:
[Config] auto flag succ, name: http_address val: 0.0.0.0:0000
[Config] auto flag fail, name: hosts val: 127.0.0.0,127.0.0.1 err: type not support []string
[Config] auto flag succ, name: log_level val: 3
[Config] auto flag succ, name: bool_var val: false
[Config] file: [conf_3.toml]
[Config] load: ./conf_1.toml
[Config] load: ./conf_2.toml
[Config] load: conf_3.toml
[Config]
{
"AutoConfFiles": "",
"HTTPAddress": "0.0.0.0:1111111",
"Hosts": [
"10.0.61.29",
"10.0.61.30",
"10.0.61.31",
"10.0.61.32",
"10.0.61.33"
],
"LogLevel": 2,
"BoolVar": true
}