You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DipDup YAML [configuration](https://docs.dipdup.net/config-file-reference) parser. You can validate config by `validate` tag from [validator package](https://github.com/go-playground/validator).
26
26
27
27
```go
28
28
import"github.com/dipdup-net/go-lib/config"
29
29
30
30
typeMyConfigstruct {
31
31
config.Config`yaml:",inline"`
32
32
// Custom field here
33
-
FieldsFields`yaml:"fields"`
34
-
}
35
-
36
-
// Validate - required by Configurable interface
37
-
func(c *MyConfig) Validate() error {
38
-
return c.Fields.Validate() // if needed
33
+
FieldsFields`yaml:"fields" validate:"required"`
39
34
}
40
35
41
36
// Substitute - required by Configurable interface
0 commit comments