From c8e15da54dee028500a6bf226eabb36c0e6c0a99 Mon Sep 17 00:00:00 2001 From: gunnaraasen Date: Wed, 11 Jan 2017 13:37:16 -0800 Subject: [PATCH] Remove token message; Fixes #7823 --- cmd/influx/cli/cli.go | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/cmd/influx/cli/cli.go b/cmd/influx/cli/cli.go index f6dcf1bce2..67be0cdc9c 100644 --- a/cmd/influx/cli/cli.go +++ b/cmd/influx/cli/cli.go @@ -28,10 +28,6 @@ import ( "github.com/peterh/liner" ) -const ( - noTokenMsg = "Visit https://enterprise.influxdata.com to register for updates, InfluxDB server management, and monitoring.\n" -) - // ErrBlankCommand is returned when a parsed command is empty. var ErrBlankCommand = errors.New("empty input") @@ -187,13 +183,6 @@ func (c *CommandLine) Run() error { c.Line.SetMultiLineMode(true) - token, err := c.DatabaseToken() - if err != nil { - return fmt.Errorf("Failed to check token: %s", err.Error()) - } - if token == "" { - fmt.Print(noTokenMsg) - } fmt.Printf("Connected to %s version %s\n", c.Client.Addr(), c.ServerVersion) c.Version() @@ -718,26 +707,6 @@ func (c *CommandLine) ExecuteQuery(query string) error { return nil } -// DatabaseToken retrieves database token. -func (c *CommandLine) DatabaseToken() (string, error) { - response, err := c.Client.Query(c.query("SHOW DIAGNOSTICS for 'registration'")) - if err != nil { - return "", err - } - - if response.Error() != nil || len(response.Results) == 0 || len(response.Results[0].Series) == 0 { - return "", nil - } - - // Look for position of "token" column. - for i, s := range (*response).Results[0].Series[0].Columns { - if s == "token" { - return (*response).Results[0].Series[0].Values[0][i].(string), nil - } - } - return "", nil -} - // FormatResponse formats output to the previously chosen format. func (c *CommandLine) FormatResponse(response *client.Response, w io.Writer) { switch c.Format {