3 Commits

Author SHA1 Message Date
Samuele Pedroni
bcbf8edafd osutil,strutil,testutil: fix imports order (according to gci) 2021-06-15 18:04:44 +02:00
Ian Johnson
f17ae685c5 strutil/shlex,osutil/udev/netlink: minimally import go-check
This allows us to use -gocheck options for the whole codebase, for example to
run all tests in the codebase with the name matching "kernel" one can now do:

go test ./... -gocheck.f kernel

and that will only fail if the tests fail, whereas previously it would fail
because in these packages gocheck was not imported and as such -gocheck.f was
not recognized as an option and the help text for `go test` was printed off
instead of running any tests.

Eventually we may want to adapt the tests in these packages to use go-check too
so that these can also be filtered/run successfully with go test and gocheck
options.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2020-11-16 15:29:02 -06:00
John R. Lenton
f975cc3fa9 strutil/quantity: new package that exports formatFoo (from progress)
Package progress had some useful formatting functions (originally
taken from github.com/chipaca/quantity), that are more generally
useful. Circular imports mean they can't be in strutil directly
(quantity uses i18n which uses strutil), but strutil/quantity seems
fine to me.
2018-01-28 21:57:05 +00:00