Merge pull request #2816 from ywk253100/170719_trim

Trim the new line in the end of token file
This commit is contained in:
Wenkai Yin 2017-07-19 17:51:49 +08:00 committed by GitHub
commit 75c4d4a60a

View File

@ -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
} }