Skip to content

Commit 234b883

Browse files
committed
feat: update default engine value and improve RedisDB address annotation
1 parent 882b880 commit 234b883

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ type (
8585
}
8686

8787
KeyValue struct {
88-
Engine KeyValueEngine `yaml:"engine" required:"true" validate:"oneof=redis in_memory" example:"redis / in_memory" default:"redis"`
88+
Engine KeyValueEngine `yaml:"engine" required:"true" validate:"oneof=redis in_memory" example:"redis / in_memory" default:"in_memory"`
8989
}
9090

9191
Transactions struct {

internal/config/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (conf PostgresDB) Engine() string {
2525
}
2626

2727
type RedisDB struct {
28-
Addr string `validate:"required" usage:"storage address in format ip:port"`
28+
Addr string `yaml:"addr" usage:"storage address in format ip:port"`
2929
User string `secret:"true" usage:"storage user password"`
3030
Password string `secret:"true" usage:"storage db name"`
3131
DBIndex int `yaml:"db_index" usage:"index of database"`

0 commit comments

Comments
 (0)