Exemple #1
0
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
}
Exemple #2
0
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
}