From a0874d7b1cebd4f0e42de5658ddd599e4b50467d Mon Sep 17 00:00:00 2001 From: Ben Firshman Date: Thu, 5 Jun 2014 12:38:54 -0700 Subject: [PATCH] Add string representation of verb enum Docker-DCO-1.1-Signed-off-by: Ben Firshman (github: bfirsh) --- beam/verbs.go | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/beam/verbs.go b/beam/verbs.go index a74614f5e1..1cacb90627 100644 --- a/beam/verbs.go +++ b/beam/verbs.go @@ -17,3 +17,35 @@ const ( Stop 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 "" +}