Commit ebcc93d Mariano Gappa
committed
1 parent 58bd0ba commit ebcc93d Copy full SHA for ebcc93d
File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ type database struct {
22
22
func main () {
23
23
databases := mustReadDatabasesConfigFile ()
24
24
25
+ if len (os .Args [1 :]) == 0 {
26
+ usage ("Target database unspecified; where should I run the query?" )
27
+ }
28
+
25
29
sql := readInput (os .Stdin )
26
30
if len (sql ) <= 3 {
27
31
usage ("No SQL to run. Exiting." )
28
32
}
29
33
30
- if len (os .Args [1 :]) == 0 {
31
- usage ("Target database unspecified; where should I run the query?" )
32
- }
33
-
34
34
targetDatabases := []string {}
35
35
for _ , k := range os .Args [1 :] {
36
36
if _ , ok := databases [k ]; k != "all" && ! ok {
Original file line number Diff line number Diff line change 25
25
26
26
echo "SELECT * FROM users WHERE name = 'John'" | sql all
27
27
28
- For more detailed help, please go to: https://github.com/MarianoGappa /sql
28
+ For more detailed help, please go to: https://github.com/marianogappa /sql
29
29
` )
30
30
os .Exit (1 )
31
31
}
You can’t perform that action at this time.
0 commit comments