diff options
Diffstat (limited to 'app/status.go')
| -rw-r--r-- | app/status.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/app/status.go b/app/status.go new file mode 100644 index 0000000..6a905c9 --- /dev/null +++ b/app/status.go @@ -0,0 +1,24 @@ +package main + +type status struct { + code int + text string +} + +type Status interface { + Code() int + Text() string +} + +var ( + Ok Status = &status{200, "OK"} + NotFound Status = &status{404, "Not Found"} +) + +func (s *status) Code() int { + return s.code +} + +func (s *status) Text() string { + return s.text +} |