Add string representation of verb enum

Docker-DCO-1.1-Signed-off-by: Ben Firshman <ben@firshman.co.uk> (github: bfirsh)
This commit is contained in:
Ben Firshman 2014-06-05 12:38:54 -07:00
parent d95b9728e8
commit a0874d7b1c
1 changed files with 32 additions and 0 deletions

View File

@ -17,3 +17,35 @@ const (
Stop Stop
Watch Watch
) )
func (v Verb) String() string {
switch v {
case Ack:
return "Ack"
case Attach:
return "Attach"
case Connect:
return "Connect"
case Error:
return "Error"
case File:
return "File"
case Get:
return "Get"
case Log:
return "Log"
case Ls:
return "Ls"
case Set:
return "Set"
case Spawn:
return "Spawn"
case Start:
return "Start"
case Stop:
return "Stop"
case Watch:
return "Watch"
}
return ""
}