Skip to content

Commit

Permalink
Merge pull request #261 from polycube-network/jpi-polycubectl
Browse files Browse the repository at this point in the history
bypass the data format if the data is a string type
  • Loading branch information
goldenrye committed Jan 23, 2020
2 parents 0ba44f3 + 74f2a22 commit 7c684ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/polycubectl/prettyprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ func formatValue(data interface{}) string {
buf := ""
buf = fmt.Sprintf("%v", data)

if reflect.ValueOf(data).Kind() == reflect.String {
return buf
}

_, erri := strconv.ParseInt(buf, 10, 64)
if erri != nil {
f, errf := strconv.ParseFloat(buf, 64)
Expand Down

0 comments on commit 7c684ee

Please sign in to comment.