File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121 "io/ioutil"
2222 "log"
2323 "os"
24+ "strings"
2425 "time"
2526
2627 kubeinformers "k8s.io/client-go/informers"
@@ -61,18 +62,20 @@ func (i *InfraConfig) GetInletsClientImage() string {
6162 return i .InletsClientImage
6263}
6364
64- // GetAccessKey from parameter or file
65+ // GetAccessKey from parameter or file trimming
66+ // any whitespace found.
6567func (i * InfraConfig ) GetAccessKey () string {
6668 if len (i .AccessKeyFile ) > 0 {
6769 data , err := ioutil .ReadFile (i .AccessKeyFile )
6870
6971 if err != nil {
7072 log .Fatalln (err )
7173 }
72- return string (data )
74+
75+ return strings .TrimSpace (string (data ))
7376 }
7477
75- return i .AccessKey
78+ return strings . TrimSpace ( i .AccessKey )
7679}
7780
7881func main () {
You can’t perform that action at this time.
0 commit comments