Skip to content

Commit 7c684ee

Browse files
authored
Merge pull request #261 from polycube-network/jpi-polycubectl
bypass the data format if the data is a string type
2 parents 0ba44f3 + 74f2a22 commit 7c684ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/polycubectl/prettyprint.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,10 @@ func formatValue(data interface{}) string {
296296
buf := ""
297297
buf = fmt.Sprintf("%v", data)
298298

299+
if reflect.ValueOf(data).Kind() == reflect.String {
300+
return buf
301+
}
302+
299303
_, erri := strconv.ParseInt(buf, 10, 64)
300304
if erri != nil {
301305
f, errf := strconv.ParseFloat(buf, 64)

0 commit comments

Comments
 (0)