Commit Graph

9 Commits

Author SHA1 Message Date
Alec Thomas e75e1ca88a refactor: switch to alecthomas/assert 2022-06-21 20:58:10 +10:00
James Lamb 9d72e94240 Update yaml v3 to v3.0.1 to fix CVE 2022 28948 (#309) 2022-06-09 19:16:25 -07:00
Denis Titusov 89b2806f6a Switch to the standard errors API, that was introduced in 1.13 (#273)
* Switch to the standard errors API, that was introduced in 1.13

* Fix linter errors 🤦‍

* Remove withStackError

* fix: freeze go version to 1.17, since 1.18 introduced generics, which are not supported by linters yet

* fix: freeze go version to 1.17, since 1.18 introduced generics, which are not supported by linters yet
2022-03-18 18:54:29 +11:00
Alec Thomas 9c9b8ab50b More enum fixes. 2021-12-13 18:54:06 +11:00
Toshimaru 9c81441ae0 Update go modules (#165) 2021-05-03 14:16:08 +10:00
Alec Thomas 01b720cb19 Test and docs for TextUnmarshaler and json.Unmarshaler. 2020-01-10 12:15:54 +11:00
Alec Thomas cd3f64f045 Support "yes", "1" and "true" for bool values. 2019-11-13 08:20:41 +11:00
Alec Thomas 439c674f7a Use interface{} instead of string in tokens.
This allows the scanner and resolvers to pass Go types around rather
than having to serialise/deserialise to/from strings.
2019-04-24 23:25:13 +10:00
Alec Thomas 2e29ff8981 Add support for setting variables via tag.
This provides much more convenient composition when reusing structs in
different parts of the command grammar.

eg.

	type Embedded struct {
		Key string `help:"A key from ${where}."`
	}

	var cli struct {
		Embedded `set:"where=somewhere"`
	}
2018-09-19 12:57:59 +10:00