@@ -2,6 +2,7 @@ package cmd
22
33import (
44 "bufio"
5+ "errors"
56 "fmt"
67 "io"
78 "net/http"
@@ -54,7 +55,7 @@ func getURL(db *turso.Database, client *turso.Client, http bool, primaryOnly boo
5455 }
5556 }
5657
57- return "" , fmt . Errorf ("primary not found" )
58+ return "" , errors . New ("primary not found" )
5859 }
5960
6061 instances , err := client .Instances .List (db .Name )
@@ -73,7 +74,7 @@ func getURL(db *turso.Database, client *turso.Client, http bool, primaryOnly boo
7374 if instanceFlag != "" {
7475 return "" , fmt .Errorf ("instance %s for db %s not found" , instanceFlag , db .Name )
7576 }
76- return "" , fmt . Errorf ("impossible" )
77+ return "" , errors . New ("impossible" )
7778}
7879
7980func getDbURLForDump (u string ) string {
@@ -93,7 +94,7 @@ var shellCmd = &cobra.Command{
9394 RunE : func (cmd * cobra.Command , args []string ) error {
9495 nameOrUrl := args [0 ]
9596 if nameOrUrl == "" {
96- return fmt . Errorf ("please specify a database name" )
97+ return errors . New ("please specify a database name" )
9798 }
9899 cmd .SilenceUsage = true
99100
@@ -106,7 +107,7 @@ var shellCmd = &cobra.Command{
106107 sql := ""
107108 if len (args ) == 2 {
108109 if len (args [1 ]) == 0 {
109- return fmt . Errorf ("no SQL command to execute" )
110+ return errors . New ("no SQL command to execute" )
110111 }
111112 if args [1 ] == ".dump" {
112113 isDump = true
@@ -176,7 +177,7 @@ var shellCmd = &cobra.Command{
176177 }
177178
178179 if countNonEmpty (authTokenSnake , authTokenCamel , jwt ) > 1 {
179- return fmt . Errorf ("please use at most one of the following query parameters: 'auth_token', 'authToken', 'jwt'" )
180+ return errors . New ("please use at most one of the following query parameters: 'auth_token', 'authToken', 'jwt'" )
180181 }
181182
182183 if authTokenSnake != "" {
0 commit comments