Skip to content

Commit

Permalink
task: adding guard statement on database
Browse files Browse the repository at this point in the history
  • Loading branch information
paganotoni committed Jun 24, 2024
1 parent bbdf0f1 commit fa1123f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/kit/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ import (
// database provides operations to manage the database
// during development. It can create, drop and run migrations.
func database(args []string) error {
if len(args) < 2 {
fmt.Println("Usage: database <command>")

return nil
}

url := os.Getenv("DATABASE_URL")
if url == "" {
fmt.Println(" DATABASE_URL is not set")
Expand Down

0 comments on commit fa1123f

Please sign in to comment.