func New(name, path string, cfg *Config) (*Concierge, error) {
	if name == "" {
		return nil, errors.New("name isn't set and can't be empty.")
	}

	if path == "" {
		return nil, errors.New("path isn't set and can't be empty.")
	}
	if cfg == nil {
		return nil, errors.New("cfg is nil, please provide at least an empty config.")
	}

	cfg.registryKey = fmt.Sprintf(`SYSTEM\CurrentControlSet\Services\%s`, name)

	return &Concierge{
		name: name,
		path: path,
		cfg:  cfg,
	}, nil
}
// New creates a new Concierge for managing a Windows Service.
New creates a new Concierge for managing a Windows Service.
// New creates a new Concierge for managing a Windows Service .
func New(name, path string, cfg *Config) (*Concierge, error) {
	if name == "" {
		return nil, errors.New("name isn't set and can't be empty.")
	}
	if path == "" {
		return nil, errors.New("path isn't set and can't be empty.")
	}
	if cfg == nil {
		return nil, errors.New("cfg is nil, please provide at least an empty config.")
	}
	cfg.registryKey = fmt.Sprintf(`SYSTEM\CurrentControlSet\Services\%s`, name)
	return &Concierge{
		name: name,
		path: path,
		cfg:  cfg,
	}, nil
}
func New ( name , path string , cfg * Config ) ( * Concierge , error ) { if name == " " { return nil , errors . New ( " " ) } if path == " " { return nil , errors . New ( " " ) } if cfg == nil { return nil , errors . New ( " " ) } cfg . registryKey = fmt . Sprintf ( `SYSTEM\CurrentControlSet\Services\%s` , name ) return & Concierge { name : name , path : path , cfg : cfg , } , nil }
New creates a new Concierge for managing a Windows Service.
New creates a new Concierge for managing a Windows Service .