func (c *Concierge) State() (svc.State, error) {
	service, err := c.fetchService()
	if err != nil {
		return svc.State(windows.SERVICE_NO_CHANGE), errors.Wrap(err, "error opening the service")
	}
	defer service.Close()

	status, err := service.Query()
	if err != nil {
		return svc.State(windows.SERVICE_NO_CHANGE), errors.Wrap(err, "error querying the service")
	}
	return status.State, nil
}
// State gets the state of the service. Examples are stopped, running, etc.
State gets the state of the service. Examples are stopped, running, etc.
// State gets the state of the service . Examples are stopped running etc .
func (c *Concierge) State() (svc.State, error) {
	service, err := c.fetchService()
	if err != nil {
		return svc.State(windows.SERVICE_NO_CHANGE), errors.Wrap(err, "error opening the service")
	}
	defer service.Close()
	status, err := service.Query()
	if err != nil {
		return svc.State(windows.SERVICE_NO_CHANGE), errors.Wrap(err, "error querying the service")
	}
	return status.State, nil
}
func ( c * Concierge ) State ( ) ( svc . State , error ) { service , err := c . fetchService ( ) if err != nil { return svc . State ( windows . SERVICE_NO_CHANGE ) , errors . Wrap ( err , " " ) } defer service . Close ( ) status , err := service . Query ( ) if err != nil { return svc . State ( windows . SERVICE_NO_CHANGE ) , errors . Wrap ( err , " " ) } return status . State , nil }
State gets the state of the service.
State gets the state of the service .