mirror of
https://github.com/iLoveElysia/openbilibili.git
synced 2026-03-14 05:46:26 -05:00
21 lines
307 B
Go
21 lines
307 B
Go
|
|
package lancermonitor
|
||
|
|
|
||
|
|
import (
|
||
|
|
"errors"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Config struct {
|
||
|
|
Addr string `toml:"addr"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (c *Config) ConfigValidate() (error) {
|
||
|
|
if c == nil {
|
||
|
|
return errors.New("config of LancerMonitor is nil")
|
||
|
|
}
|
||
|
|
|
||
|
|
if c.Addr == "" {
|
||
|
|
return errors.New("addr of LancerMonitor can't be nil")
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|