// SvcExists Checks whether a service with the given name exists in the current application or not
// serviceName is the service name to perform check for
// The first returned parameter is a bool indicating if a service with the given name already exists or not
// The second returned parameter is the error that might occurs while execution
SvcExists Checks whether a service with the given name exists in the current application or not
serviceName is the service name to perform check for
The first returned parameter is a bool indicating if a service with the given name already exists or not
The second returned parameter is the error that might occurs while execution
// SvcExists Checks whether a service with the given name exists in the current application or not // serviceName is the service name to perform check for // The first returned parameter is a bool indicating if a service with the given name already exists or not // The second returned parameter is the error that might occurs while execution
func SvcExists(client *occlient.Client, serviceName, applicationName string) (bool, error) {
	serviceList, err := List(client, applicationName)
	if err != nil {
		return false, errors.Wrap(err, "unable to get the service list")
	}
	for _, service := range serviceList {
		if service.Name == serviceName {
			return true, nil
		}
	}
	return false, nil
}
func SvcExists ( client * occlient . Client , serviceName , applicationName string ) ( bool , error ) { serviceList , err := List ( client , applicationName ) if err != nil { return false , errors . Wrap ( err , " " ) } for _ , service := range serviceList { if service . Name == serviceName { return true , nil } } return false , nil }
SvcExists Checks whether a service with the given name exists in the current application or not
serviceName is the service name to perform check for
The first returned parameter is a bool indicating if a service with the given name already exists or not
The second returned parameter is the error that might occurs while execution
SvcExists Checks whether a service with the given name exists in the current application or not serviceName is the service name to perform check for The first returned parameter is a bool indicating if a service with the given name already exists or not The second returned parameter is the error that might occurs while execution