nitter/nitters/config.go
Peter Kurfer 6507d44725
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is passing
feat: run PoC in pipeline
2023-03-08 16:37:00 +01:00

25 lines
423 B
Go

package nitters
import "errors"
var (
ErrMissingNamespace = errors.New("namespace is required")
ErrMissingRepo = errors.New("repo name is required")
)
type Config struct {
Namespace string `mapstructure:"namespace"`
Repo string `mapstructure:"repo"`
}
func (c Config) Validate() error {
if c.Namespace == "" {
return ErrMissingNamespace
}
if c.Repo == "" {
return ErrMissingRepo
}
return nil
}