From 89cc1ed3e901ced31e73bc9d15278d28a3d1d928 Mon Sep 17 00:00:00 2001 From: Koustav Das <78158736+Koustavd18@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:37:37 +0530 Subject: [PATCH] Fix: update demo server URL (#42) also fix 'pb query' to print error message if there is no argument --- cmd/query.go | 11 ++++------- main.go | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cmd/query.go b/cmd/query.go index 1625c75..744f758 100644 --- a/cmd/query.go +++ b/cmd/query.go @@ -55,13 +55,10 @@ var query = &cobra.Command{ // if no query is provided set it to default "select * from " // here is the first stream that server returns if len(args) == 0 || args[0] == "" || args[0] == " " { - stream, err := fetchFirstStream() - if err != nil { - return err - } - query = fmt.Sprintf("select * from %s", stream) - } else { - query = args[0] + fmt.Println("please enter your query") + fmt.Printf("Example:\n pb query \"select * from frontend\" --from=10m --to=now") + return nil + } start, err := command.Flags().GetString(startFlag) diff --git a/main.go b/main.go index bf91933..db1e4db 100644 --- a/main.go +++ b/main.go @@ -38,7 +38,7 @@ var ( func defaultInitialProfile() config.Profile { return config.Profile{ - URL: "https://demo.parseable.io", + URL: "https://demo.parseable.com", Username: "admin", Password: "admin", }