From 246a15de358e70aadf5557359b55072f57fca277 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Tue, 4 Aug 2020 17:46:12 +0300 Subject: [PATCH] cli: Add empty neofs-cli app structure In the following release `neofs-cli` will be used to directly manage NeoFS Node. All required definitions and interfaces are also moving from `neofs-api` to `neofs-node` repository, so it's more convinient to have `neofs-cli` here. Signed-off-by: Stanislav Bogatyrev --- Dockerfile.cli | 21 ++++++++ Makefile | 14 +++-- cmd/neofs-cli/main.go | 7 +++ cmd/neofs-cli/modules/accounting.go | 31 +++++++++++ cmd/neofs-cli/modules/acl.go | 31 +++++++++++ cmd/neofs-cli/modules/completion.go | 62 ++++++++++++++++++++++ cmd/neofs-cli/modules/container.go | 31 +++++++++++ cmd/neofs-cli/modules/netmap.go | 31 +++++++++++ cmd/neofs-cli/modules/object.go | 31 +++++++++++ cmd/neofs-cli/modules/root.go | 74 +++++++++++++++++++++++++++ cmd/neofs-cli/modules/storagegroup.go | 31 +++++++++++ cmd/neofs-cli/modules/version.go | 47 +++++++++++++++++ go.mod | 2 + go.sum | 13 +++++ misc/build.go | 3 +- 15 files changed, 423 insertions(+), 6 deletions(-) create mode 100644 Dockerfile.cli create mode 100644 cmd/neofs-cli/main.go create mode 100644 cmd/neofs-cli/modules/accounting.go create mode 100644 cmd/neofs-cli/modules/acl.go create mode 100644 cmd/neofs-cli/modules/completion.go create mode 100644 cmd/neofs-cli/modules/container.go create mode 100644 cmd/neofs-cli/modules/netmap.go create mode 100644 cmd/neofs-cli/modules/object.go create mode 100644 cmd/neofs-cli/modules/root.go create mode 100644 cmd/neofs-cli/modules/storagegroup.go create mode 100644 cmd/neofs-cli/modules/version.go diff --git a/Dockerfile.cli b/Dockerfile.cli new file mode 100644 index 000000000..53ca7d23c --- /dev/null +++ b/Dockerfile.cli @@ -0,0 +1,21 @@ +FROM golang:1.14-alpine as basebuilder +RUN apk add --update make bash + +FROM basebuilder as builder +ARG BUILD=now +ARG VERSION=dev +ARG REPO=repository +WORKDIR /src +COPY . /src + +RUN make bin/neofs-cli + +# Executable image +FROM scratch AS neofs-cli + +WORKDIR / + +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /src/bin/neofs-cli /bin/neofs-cli + +CMD ["neofs-cli"] diff --git a/Makefile b/Makefile index b191e99d6..987544d05 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,9 @@ SHELL = bash REPO ?= $(shell go list -m) -VERSION ?= "$(shell git describe --tags --dirty --always)" +VERSION ?= $(shell git describe --tags --dirty --always) +BUILD ?= $(shell date -u --iso=seconds) +DEBUG ?= false HUB_IMAGE ?= nspccdev/neofs HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')" @@ -10,8 +12,8 @@ HUB_TAG ?= "$(shell echo ${VERSION} | sed 's/^v//')" BIN = bin DIRS= $(BIN) -# List of binaries to build. May be automated. -CMDS = neofs-node neofs-ir +# List of binaries to build. +CMDS = $(notdir $(basename $(wildcard cmd/*))) CMS = $(addprefix $(BIN)/, $(CMDS)) BINS = $(addprefix $(BIN)/, $(CMDS)) @@ -27,7 +29,9 @@ $(BINS): $(DIRS) dep CGO_ENABLED=0 \ GO111MODULE=on \ go build -v -trimpath \ - -ldflags "-X ${REPO}/misc.Version=$(VERSION) -X ${REPO}/misc.Build=${BUILD}" \ + -ldflags "-X $(REPO)/misc.Version=$(VERSION) \ + -X $(REPO)/misc.Build=$(BUILD) \ + -X $(REPO)/misc.Debug=$(DEBUG)" \ -o $@ ./cmd/$(notdir $@) $(DIRS): @@ -76,7 +80,7 @@ image-%: -t $(HUB_IMAGE)-$*:$(HUB_TAG) . # Build all Docker images -images: image-storage image-ir +images: image-storage image-ir image-cli # Run all code formaters fmts: fmt imports diff --git a/cmd/neofs-cli/main.go b/cmd/neofs-cli/main.go new file mode 100644 index 000000000..abdf9a4d5 --- /dev/null +++ b/cmd/neofs-cli/main.go @@ -0,0 +1,7 @@ +package main + +import cmd "github.com/nspcc-dev/neofs-node/cmd/neofs-cli/modules" + +func main() { + cmd.Execute() +} diff --git a/cmd/neofs-cli/modules/accounting.go b/cmd/neofs-cli/modules/accounting.go new file mode 100644 index 000000000..8d22d5cdd --- /dev/null +++ b/cmd/neofs-cli/modules/accounting.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// accountingCmd represents the accounting command +var accountingCmd = &cobra.Command{ + Use: "accounting", + Short: "Operations with accounts and balances", + Long: `Operations with accounts and balances`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("accounting called") + }, +} + +func init() { + rootCmd.AddCommand(accountingCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // accountingCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // accountingCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/neofs-cli/modules/acl.go b/cmd/neofs-cli/modules/acl.go new file mode 100644 index 000000000..101e48ec7 --- /dev/null +++ b/cmd/neofs-cli/modules/acl.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// aclCmd represents the acl command +var aclCmd = &cobra.Command{ + Use: "acl", + Short: "Operations with Access Control Lists", + Long: `Operations with Access Control Lists`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("acl called") + }, +} + +func init() { + rootCmd.AddCommand(aclCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // aclCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // aclCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/neofs-cli/modules/completion.go b/cmd/neofs-cli/modules/completion.go new file mode 100644 index 000000000..2a45d5c92 --- /dev/null +++ b/cmd/neofs-cli/modules/completion.go @@ -0,0 +1,62 @@ +package cmd + +import ( + "os" + + "github.com/spf13/cobra" +) + +var completionCmd = &cobra.Command{ + Use: "completion [bash|zsh|fish|powershell]", + Short: "Generate completion script", + Long: `To load completions: + +Bash: + +$ source <(neofs-cli completion bash) + +# To load completions for each session, execute once: +Linux: + $ neofs-cli completion bash > /etc/bash_completion.d/neofs-cli +MacOS: + $ neofs-cli completion bash > /usr/local/etc/bash_completion.d/neofs-cli + +Zsh: + +# If shell completion is not already enabled in your environment you will need +# to enable it. You can execute the following once: + +$ echo "autoload -U compinit; compinit" >> ~/.zshrc + +# To load completions for each session, execute once: +$ neofs-cli completion zsh > "${fpath[1]}/_neofs-cli" + +# You will need to start a new shell for this setup to take effect. + +Fish: + +$ neofs-cli completion fish | source + +# To load completions for each session, execute once: +$ neofs-cli completion fish > ~/.config/fish/completions/neofs-cli.fish +`, + DisableFlagsInUseLine: true, + ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, + Args: cobra.ExactValidArgs(1), + Run: func(cmd *cobra.Command, args []string) { + switch args[0] { + case "bash": + _ = cmd.Root().GenBashCompletion(os.Stdout) + case "zsh": + _ = cmd.Root().GenZshCompletion(os.Stdout) + case "fish": + _ = cmd.Root().GenFishCompletion(os.Stdout, true) + case "powershell": + _ = cmd.Root().GenPowerShellCompletion(os.Stdout) + } + }, +} + +func init() { + rootCmd.AddCommand(completionCmd) +} diff --git a/cmd/neofs-cli/modules/container.go b/cmd/neofs-cli/modules/container.go new file mode 100644 index 000000000..d7ec4765b --- /dev/null +++ b/cmd/neofs-cli/modules/container.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// containerCmd represents the container command +var containerCmd = &cobra.Command{ + Use: "container", + Short: "Operations with Containers", + Long: `Operations with Containers`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("container called") + }, +} + +func init() { + rootCmd.AddCommand(containerCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // containerCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // containerCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/neofs-cli/modules/netmap.go b/cmd/neofs-cli/modules/netmap.go new file mode 100644 index 000000000..fbb09cd91 --- /dev/null +++ b/cmd/neofs-cli/modules/netmap.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// netmapCmd represents the netmap command +var netmapCmd = &cobra.Command{ + Use: "netmap", + Short: "Operations with Network Map", + Long: `Operations with Network Map`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("netmap called") + }, +} + +func init() { + rootCmd.AddCommand(netmapCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // netmapCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // netmapCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/neofs-cli/modules/object.go b/cmd/neofs-cli/modules/object.go new file mode 100644 index 000000000..b5c5d543e --- /dev/null +++ b/cmd/neofs-cli/modules/object.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// objectCmd represents the object command +var objectCmd = &cobra.Command{ + Use: "object", + Short: "Operations with Objects", + Long: `Operations with Objects`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("object called") + }, +} + +func init() { + rootCmd.AddCommand(objectCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // objectCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // objectCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/neofs-cli/modules/root.go b/cmd/neofs-cli/modules/root.go new file mode 100644 index 000000000..9d8fdab17 --- /dev/null +++ b/cmd/neofs-cli/modules/root.go @@ -0,0 +1,74 @@ +package cmd + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" + + homedir "github.com/mitchellh/go-homedir" + "github.com/spf13/viper" +) + +var cfgFile string + +// rootCmd represents the base command when called without any subcommands +var rootCmd = &cobra.Command{ + Use: "neofs-cli", + Short: "Command Line Tool to work with NeoFS", + Long: `NeoFS CLI provides all basic interactions with NeoFS and it's services. + +It contains commands for interaction with NeoFS nodes using different versions +of neofs-api and some useful utilities for compiling ACL rules from JSON +notation, managing container access through protocol gates, querying network map +and much more!`, +} + +// Execute adds all child commands to the root command and sets flags appropriately. +// This is called by main.main(). It only needs to happen once to the rootCmd. +func Execute() { + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} + +func init() { + cobra.OnInitialize(initConfig) + + // Here you will define your flags and configuration settings. + // Cobra supports persistent flags, which, if defined here, + // will be global for your application. + + rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.config/neofs-cli/config.yaml)") + + // Cobra also supports local flags, which will only run + // when this action is called directly. + // rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} + +// initConfig reads in config file and ENV variables if set. +func initConfig() { + if cfgFile != "" { + // Use config file from the flag. + viper.SetConfigFile(cfgFile) + } else { + // Find home directory. + home, err := homedir.Dir() + if err != nil { + fmt.Println(err) + os.Exit(1) + } + + // Search config in home directory with name ".main" (without extension). + viper.AddConfigPath(home) + viper.SetConfigName(".config/neofs-cli") + } + + viper.AutomaticEnv() // read in environment variables that match + + // If a config file is found, read it in. + if err := viper.ReadInConfig(); err == nil { + fmt.Println("Using config file:", viper.ConfigFileUsed()) + } +} diff --git a/cmd/neofs-cli/modules/storagegroup.go b/cmd/neofs-cli/modules/storagegroup.go new file mode 100644 index 000000000..c7302ff0c --- /dev/null +++ b/cmd/neofs-cli/modules/storagegroup.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +// storagegroupCmd represents the storagegroup command +var storagegroupCmd = &cobra.Command{ + Use: "storagegroup", + Short: "Operations with Storage Groups", + Long: `Operations with Storage Groups`, + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("storagegroup called") + }, +} + +func init() { + rootCmd.AddCommand(storagegroupCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // storagegroupCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // storagegroupCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/neofs-cli/modules/version.go b/cmd/neofs-cli/modules/version.go new file mode 100644 index 000000000..939b3d3b9 --- /dev/null +++ b/cmd/neofs-cli/modules/version.go @@ -0,0 +1,47 @@ +package cmd + +import ( + "encoding/json" + "fmt" + "github.com/nspcc-dev/neofs-node/misc" + + "github.com/spf13/cobra" +) + +var ( + // versionCmd represents the version command + versionCmd = &cobra.Command{ + Use: "version", + Short: "Print version and exit", + Run: versionRun, + } +) + +var flagJSON bool + +type VersionInfo struct { + Version string `json:"Version,omitempty"` + Build string `json:"Build,omitempty"` + Debug string `json:"Debug,omitempty"` +} + +func init() { + rootCmd.AddCommand(versionCmd) + versionCmd.Flags().BoolVarP(&flagJSON, "json", "j", false, "Print version information in JSON") +} + +func versionRun(cmd *cobra.Command, args []string) { + + versionInfo := VersionInfo{Version: misc.Version, Build: misc.Build, Debug: misc.Debug} + + if flagJSON { + bytes, _ := json.Marshal(versionInfo) + fmt.Printf("%s", string(bytes)+"\n") + return + } + + fmt.Printf("Version: %s \nBuild: %s \nDebug: %s\n", + versionInfo.Version, + versionInfo.Build, + versionInfo.Debug) +} diff --git a/go.mod b/go.mod index 0b66e86c8..3483090f0 100644 --- a/go.mod +++ b/go.mod @@ -6,6 +6,7 @@ require ( bou.ke/monkey v1.0.2 github.com/golang/protobuf v1.4.2 github.com/google/uuid v1.1.1 + github.com/mitchellh/go-homedir v1.1.0 github.com/mr-tron/base58 v1.1.3 github.com/multiformats/go-multiaddr v0.2.0 github.com/multiformats/go-multiaddr-net v0.1.2 // v0.1.1 => v0.1.2 @@ -17,6 +18,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.6.0 github.com/soheilhy/cmux v0.1.4 + github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.0 github.com/stretchr/testify v1.6.1 diff --git a/go.sum b/go.sum index a99aeddd9..c54ce5c71 100644 --- a/go.sum +++ b/go.sum @@ -87,6 +87,7 @@ github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -173,6 +174,7 @@ github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0 h1:Iju5GlWwrvL6UBg4zJJt3btmonfrMlCDdsejg4CZE7c= @@ -204,6 +206,7 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= @@ -256,6 +259,7 @@ github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771 h1:MHkK1uRtFbV github.com/minio/sha256-simd v0.1.1-0.20190913151208-6de447530771/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= @@ -374,8 +378,10 @@ github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40T github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= @@ -396,7 +402,10 @@ github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= @@ -404,6 +413,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -420,6 +430,7 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/syndtr/goleveldb v0.0.0-20180307113352-169b1b37be73 h1:I2drr5K0tykBofr74ZEGliE/Hf6fNkEbcPyFvsy7wZk= github.com/syndtr/goleveldb v0.0.0-20180307113352-169b1b37be73/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/urfave/cli v1.20.0 h1:fDqGv3UG/4jbVl/QkFwEdddtEDjh/5Ov6X+0B/3bPaw= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -510,6 +521,7 @@ golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980 h1:dfGZHvZk057jK2MCeWus/TowKpJ8y4AmooUzdBSR9GU= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -619,6 +631,7 @@ google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgX google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/misc/build.go b/misc/build.go index 61b4613ef..243977986 100644 --- a/misc/build.go +++ b/misc/build.go @@ -23,5 +23,6 @@ var ( Version = "dev" // Debug is an application debug mode flag. - Debug = "true" + Debug = "false" ) +