diff options
| author | Will Hawkins <[email protected]> | 2023-04-25 22:53:35 -0400 |
|---|---|---|
| committer | Will Hawkins <[email protected]> | 2023-04-25 23:00:12 -0400 |
| commit | c9a33075c873c4ef8bb3c695cce721172c31d361 (patch) | |
| tree | e46e766182bba75f0bcc707bf72b4359ce8ecd9f /lgc/lgc.go | |
| parent | 9e9963f7767719e4c26e2345169d7768ec5151ac (diff) | |
Make LgcStatus String()-able
Make an LgcStatus type print nicely with %v format verb.
Diffstat (limited to 'lgc/lgc.go')
| -rw-r--r-- | lgc/lgc.go | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -41,3 +41,17 @@ const ( LGC_STATUS_DONE LGC_STATUS_ERROR ) + +func (status LgcStatus) String() string { + switch status { + case LGC_STATUS_DONE: + return "Load-Generating Connection Done" + case LGC_STATUS_RUNNING: + return "Load-Generating Connection Running" + case LGC_STATUS_ERROR: + return "Load-Generating Connection Error" + case LGC_STATUS_NOT_STARTED: + return "Load-Generating Connection Not Started" + } + return "Load-Generating Connection in invalid state" +} |
