Commit Graph

9 Commits

Author SHA1 Message Date
Alec Thomas e75e1ca88a refactor: switch to alecthomas/assert 2022-06-21 20:58:10 +10: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
Mitar ece1f6d8cb Allow more flexible callback return error type. 2021-12-13 12:00:13 +11:00
Stan Rozenraukh 74cb5130e3 Adds Context.BindToProvider (#201) 2021-08-31 06:47:02 +10:00
Alec Thomas b8c82fea7c Allow binds to be provided by a function.
This is useful for situations where the initialisation of some object
should be deferred, eg. when there are distinct "setup" and "use" phases
to a tools lifecycle.
2020-03-03 14:07:40 +11:00
Alec Thomas d15c8fca8d Bind parent nodes when executing Run(). 2019-10-30 13:46:08 +11:00
Alec Thomas 119a0d115b Ensure context bindings are used for Run(). 2018-09-27 14:58:03 +10:00
Alec Thomas f72f53d947 Support for adding bindings to the Context.
This is very useful for hooks to pre-construct objects that can be used
by all subsequent downstream commands, for example.
2018-09-27 14:20:16 +10:00
Alec Thomas a13c5a0039 Add hook callback methods.
`BeforeHook()` and `AfterHook()` may be implemented on CLI nodes to
trigger hooks. Use the `Bind()` option to bind potential arguments.
2018-07-04 22:31:29 +10:00