Skip to content

Commit

Permalink
Fix to set default value of metadata database
Browse files Browse the repository at this point in the history
  • Loading branch information
toga4 committed Jan 8, 2023
1 parent 462659e commit b348e18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/spream/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Options:

fs.StringVar(&flags.database, "database", "", "")
fs.StringVar(&flags.streamName, "stream", "", "")
fs.StringVar(&flags.metadataTableName, "metadata-table", flags.database, "")
fs.StringVar(&flags.metadataTableName, "metadata-table", "", "")
fs.StringVar(&flags.metadataDatabase, "metadata-database", flags.database, "")
fs.DurationVar(&flags.heartbeatInterval, "heartbeat-interval", 10*time.Second, "")

Expand All @@ -79,6 +79,9 @@ Options:
fs.Usage()
return nil, errors.New("database and stream is required")
}
if flags.metadataDatabase == "" {
flags.metadataDatabase = flags.database
}

if start != "" {
t, err := time.Parse(time.RFC3339, start)
Expand Down

0 comments on commit b348e18

Please sign in to comment.