21 lines
266 B
Go
21 lines
266 B
Go
|
package sentry
|
||
|
|
||
|
import "errors"
|
||
|
|
||
|
type Config struct {
|
||
|
Dsn string
|
||
|
Env string
|
||
|
}
|
||
|
|
||
|
func (c Config) validate() error {
|
||
|
if c.Dsn == "" {
|
||
|
return errors.New("sentry DNS is required")
|
||
|
}
|
||
|
|
||
|
if c.Env == "" {
|
||
|
return errors.New("sentry ENV is required")
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|