Merge pull request #7231 from hashicorp/b-alloc-dev-panic

api: fix panic when displaying devices w/o stat
This commit is contained in:
Michael Schurter
2020-03-09 07:34:59 -07:00
committed by GitHub
2 changed files with 3 additions and 0 deletions

View File

@@ -676,6 +676,8 @@ type StatValue struct {
func (v *StatValue) String() string {
switch {
case v == nil:
return "<none>"
case v.BoolVal != nil:
return strconv.FormatBool(*v.BoolVal)
case v.StringVal != nil: