mirror of https://github.com/knative/pkg.git
fix: revert string parsing in configmap to not trim spaces
Signed-off-by: Calum Murray <cmurray@redhat.com>
This commit is contained in:
parent
3eb1089fec
commit
7f71db5e08
|
|
@ -19,7 +19,6 @@ package parser
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -72,7 +71,7 @@ func parse[T parseable](s string) (T, error) {
|
||||||
|
|
||||||
switch any(zero).(type) {
|
switch any(zero).(type) {
|
||||||
case string:
|
case string:
|
||||||
val = strings.TrimSpace(s)
|
val = s
|
||||||
case int16:
|
case int16:
|
||||||
val, err = strconv.ParseInt(s, 10, 16)
|
val, err = strconv.ParseInt(s, 10, 16)
|
||||||
val = int16(val.(int64))
|
val = int16(val.(int64))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue