func (options *ServiceOptions) Validate() error { if err := validation.Path(options.WorkingDirectory); err != nil { return err } if err := validation.NoSpecialSymbols(options.User); err != nil { return err } if err := validation.NoSpecialSymbols(options.Group); err != nil { return err } if err := validation.Path(options.LogPath); err != nil { return err } return nil }
func (config *Config) Validate() error { if err := validation.NoSpecialSymbols(config.User); err != nil { return err } if err := validation.NoSpecialSymbols(config.Group); err != nil { return err } if err := validation.Path(config.DefaultWorkingDirectory); err != nil { return err } return nil }