Implement Cobra CLI tooling, Viper config tooling (#336)

* start pulling out + replacing urfave and config

* replace many many instances of config

* move more stuff => viper

* properly remove urfave

* move some flags to root command

* add testrig commands to root

* alias config file keys

* start adding cli parsing tests

* reorder viper init

* remove config path alias

* fmt

* change config file keys to non-nested

* we're more or less in business now

* tidy up the common func

* go fmt

* get tests passing again

* add note about the cliparsing tests

* reorganize

* update docs with changes

* structure cmd dir better

* rename + move some files around

* fix dangling comma
This commit is contained in:
tobi 2021-12-07 13:31:39 +01:00 committed by GitHub
commit 0884f89431
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
487 changed files with 46667 additions and 8831 deletions

66
vendor/modules.txt vendored
View file

@ -27,13 +27,9 @@ codeberg.org/gruf/go-pools
codeberg.org/gruf/go-store/kv
codeberg.org/gruf/go-store/storage
codeberg.org/gruf/go-store/util
# github.com/PuerkitoBio/goquery v1.8.0
## explicit; go 1.13
# github.com/ReneKroon/ttlcache v1.7.0
## explicit; go 1.14
github.com/ReneKroon/ttlcache
# github.com/andybalholm/cascadia v1.3.1
## explicit; go 1.16
# github.com/aymerick/douceur v0.2.0
## explicit
github.com/aymerick/douceur/css
@ -45,9 +41,6 @@ github.com/buckket/go-blurhash/base83
# github.com/coreos/go-oidc/v3 v3.1.0
## explicit; go 1.14
github.com/coreos/go-oidc/v3/oidc
# github.com/cpuguy83/go-md2man/v2 v2.0.1
## explicit; go 1.11
github.com/cpuguy83/go-md2man/v2/md2man
# github.com/davecgh/go-spew v1.1.1
## explicit
github.com/davecgh/go-spew/spew
@ -77,6 +70,9 @@ github.com/dsoprea/go-png-image-structure
# github.com/dsoprea/go-utility v0.0.0-20200717064901-2fccff4aa15e
## explicit; go 1.12
github.com/dsoprea/go-utility/image
# github.com/fsnotify/fsnotify v1.5.1
## explicit; go 1.13
github.com/fsnotify/fsnotify
# github.com/gin-contrib/cors v1.3.1
## explicit; go 1.13
github.com/gin-contrib/cors
@ -113,8 +109,6 @@ github.com/go-playground/validator/v10
# github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b
## explicit
github.com/go-xmlfmt/xmlfmt
# github.com/goccy/go-json v0.7.10
## explicit; go 1.12
# github.com/golang-jwt/jwt v3.2.2+incompatible
## explicit
github.com/golang-jwt/jwt
@ -155,6 +149,21 @@ github.com/h2non/filetype
github.com/h2non/filetype/matchers
github.com/h2non/filetype/matchers/isobmff
github.com/h2non/filetype/types
# github.com/hashicorp/hcl v1.0.0
## explicit
github.com/hashicorp/hcl
github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/hcl/hcl/parser
github.com/hashicorp/hcl/hcl/printer
github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/hcl/strconv
github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token
# github.com/inconshreveable/mousetrap v1.0.0
## explicit
github.com/inconshreveable/mousetrap
# github.com/jackc/chunkreader/v2 v2.0.1
## explicit; go 1.12
github.com/jackc/chunkreader/v2
@ -195,6 +204,9 @@ github.com/kballard/go-shellquote
# github.com/leodido/go-urn v1.2.1
## explicit; go 1.13
github.com/leodido/go-urn
# github.com/magiconair/properties v1.8.5
## explicit; go 1.13
github.com/magiconair/properties
# github.com/mattn/go-isatty v0.0.14
## explicit; go 1.12
github.com/mattn/go-isatty
@ -217,6 +229,9 @@ github.com/nfnt/resize
# github.com/oklog/ulid v1.3.1
## explicit
github.com/oklog/ulid
# github.com/pelletier/go-toml v1.9.4
## explicit; go 1.12
github.com/pelletier/go-toml
# github.com/pmezard/go-difflib v1.0.0
## explicit
github.com/pmezard/go-difflib/difflib
@ -232,13 +247,38 @@ github.com/russross/blackfriday/v2
# github.com/sirupsen/logrus v1.8.1
## explicit; go 1.13
github.com/sirupsen/logrus
# github.com/stretchr/objx v0.2.0
# github.com/spf13/afero v1.6.0
## explicit; go 1.13
github.com/spf13/afero
github.com/spf13/afero/mem
# github.com/spf13/cast v1.4.1
## explicit
github.com/spf13/cast
# github.com/spf13/cobra v1.2.1
## explicit; go 1.14
github.com/spf13/cobra
# github.com/spf13/jwalterweatherman v1.1.0
## explicit
github.com/spf13/jwalterweatherman
# github.com/spf13/pflag v1.0.5
## explicit; go 1.12
github.com/spf13/pflag
# github.com/spf13/viper v1.9.0
## explicit; go 1.12
github.com/spf13/viper
github.com/spf13/viper/internal/encoding
github.com/spf13/viper/internal/encoding/hcl
github.com/spf13/viper/internal/encoding/json
github.com/spf13/viper/internal/encoding/toml
github.com/spf13/viper/internal/encoding/yaml
# github.com/stretchr/testify v1.7.0
## explicit; go 1.13
github.com/stretchr/testify/assert
github.com/stretchr/testify/require
github.com/stretchr/testify/suite
# github.com/subosito/gotenv v1.2.0
## explicit
github.com/subosito/gotenv
# github.com/superseriousbusiness/activity v1.0.1-0.20211113133524-56560b73ace8
## explicit; go 1.12
github.com/superseriousbusiness/activity/pub
@ -466,9 +506,6 @@ github.com/uptrace/bun/dialect/pgdialect
# github.com/uptrace/bun/dialect/sqlitedialect v1.0.18
## explicit; go 1.16
github.com/uptrace/bun/dialect/sqlitedialect
# github.com/urfave/cli/v2 v2.3.0
## explicit; go 1.11
github.com/urfave/cli/v2
# github.com/vmihailenco/msgpack/v5 v5.3.5
## explicit; go 1.11
github.com/vmihailenco/msgpack/v5
@ -593,6 +630,9 @@ google.golang.org/protobuf/reflect/protoregistry
google.golang.org/protobuf/runtime/protoiface
google.golang.org/protobuf/runtime/protoimpl
google.golang.org/protobuf/types/descriptorpb
# gopkg.in/ini.v1 v1.63.2
## explicit
gopkg.in/ini.v1
# gopkg.in/square/go-jose.v2 v2.6.0
## explicit
gopkg.in/square/go-jose.v2