mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-27 05:15:47 +00:00
cleanup error messages
This commit is contained in:
@@ -208,7 +208,7 @@ func init() {
|
||||
pan, ok := params["pan"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("freed.create requires an pan parameter")
|
||||
return nil, fmt.Errorf("freed.create requires a pan parameter")
|
||||
}
|
||||
|
||||
panString, ok := pan.(string)
|
||||
@@ -222,7 +222,7 @@ func init() {
|
||||
tilt, ok := params["tilt"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("freed.create requires an tilt parameter")
|
||||
return nil, fmt.Errorf("freed.create requires a tilt parameter")
|
||||
}
|
||||
|
||||
tiltString, ok := tilt.(string)
|
||||
@@ -236,7 +236,7 @@ func init() {
|
||||
roll, ok := params["roll"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("freed.create requires an roll parameter")
|
||||
return nil, fmt.Errorf("freed.create requires a roll parameter")
|
||||
}
|
||||
|
||||
rollString, ok := roll.(string)
|
||||
@@ -308,7 +308,7 @@ func init() {
|
||||
zoom, ok := params["zoom"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("freed.create requires an zoom parameter")
|
||||
return nil, fmt.Errorf("freed.create requires a zoom parameter")
|
||||
}
|
||||
|
||||
zoomString, ok := zoom.(string)
|
||||
@@ -322,7 +322,7 @@ func init() {
|
||||
focus, ok := params["focus"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("freed.create requires an focus parameter")
|
||||
return nil, fmt.Errorf("freed.create requires a focus parameter")
|
||||
}
|
||||
|
||||
focusString, ok := focus.(string)
|
||||
|
||||
@@ -50,7 +50,7 @@ func init() {
|
||||
method, ok := params["method"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("http.request.create requires an method parameter")
|
||||
return nil, fmt.Errorf("http.request.create requires a method parameter")
|
||||
}
|
||||
|
||||
methodString, ok := method.(string)
|
||||
@@ -62,7 +62,7 @@ func init() {
|
||||
url, ok := params["url"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("http.request.create requires an url parameter")
|
||||
return nil, fmt.Errorf("http.request.create requires a url parameter")
|
||||
}
|
||||
|
||||
urlString, ok := url.(string)
|
||||
|
||||
@@ -48,7 +48,7 @@ func init() {
|
||||
path, ok := params["path"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("http.request.filter requires an path parameter")
|
||||
return nil, fmt.Errorf("http.request.filter requires a path parameter")
|
||||
}
|
||||
|
||||
pathString, ok := path.(string)
|
||||
|
||||
@@ -74,7 +74,7 @@ func init() {
|
||||
topic, ok := params["topic"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("mqtt.message.create requires an topic parameter")
|
||||
return nil, fmt.Errorf("mqtt.message.create requires a topic parameter")
|
||||
}
|
||||
|
||||
topicString, ok := topic.(string)
|
||||
@@ -86,7 +86,7 @@ func init() {
|
||||
qos, ok := params["qos"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("mqtt.message.create requires an qos parameter")
|
||||
return nil, fmt.Errorf("mqtt.message.create requires a qos parameter")
|
||||
}
|
||||
|
||||
qosByte, ok := qos.(float64)
|
||||
@@ -98,7 +98,7 @@ func init() {
|
||||
retained, ok := params["retained"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("mqtt.message.create requires an retained parameter")
|
||||
return nil, fmt.Errorf("mqtt.message.create requires a retained parameter")
|
||||
}
|
||||
|
||||
retainedBool, ok := retained.(bool)
|
||||
@@ -111,7 +111,7 @@ func init() {
|
||||
payload, ok := params["payload"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("mqtt.message.create requires an payload parameter")
|
||||
return nil, fmt.Errorf("mqtt.message.create requires a payload parameter")
|
||||
}
|
||||
|
||||
if payloadBytes, ok := payload.([]byte); ok {
|
||||
|
||||
@@ -40,7 +40,7 @@ func init() {
|
||||
pattern, ok := params["pattern"]
|
||||
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("http.request.filter requires an pattern parameter")
|
||||
return nil, fmt.Errorf("http.request.filter requires a pattern parameter")
|
||||
}
|
||||
|
||||
patternString, ok := pattern.(string)
|
||||
|
||||
Reference in New Issue
Block a user