mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-25 01:58:35 +01:00
trim the new line in the end of token file
This commit is contained in:
parent
3120abad8e
commit
e9a2ee779f
@ -16,6 +16,7 @@ package pms
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -49,5 +50,5 @@ func (f *FileTokenReader) ReadToken() (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
return string(data), nil
|
return strings.TrimRight(string(data), "\n"), nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user