diff options
Diffstat (limited to 'octoprintApis/StatusMapping.go')
-rwxr-xr-x | octoprintApis/StatusMapping.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/octoprintApis/StatusMapping.go b/octoprintApis/StatusMapping.go new file mode 100755 index 0000000..d49ed4b --- /dev/null +++ b/octoprintApis/StatusMapping.go @@ -0,0 +1,23 @@ +package octoprintApis + +import ( + // "errors" + "fmt" + // "io" + // "io/ioutil" + // "net/http" + // "net/url" + // "time" +) + + +type StatusMapping map[int]string + +func (this *StatusMapping) Error(code int) error { + err, ok := (*this)[code] + if ok { + return fmt.Errorf(err) + } + + return nil +} |