Skip to content

Commit

Permalink
Merge pull request #6030 from planetscale/jacques_6029
Browse files Browse the repository at this point in the history
Implement #6029 by chomping trailing newlines in -topo_zk_auth_file
  • Loading branch information
sougou authored Apr 9, 2020
2 parents f7c9824 + b7ae5aa commit 3412a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/vt/topo/zk2topo/zk_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (c *ZkConn) maybeAddAuth(ctx context.Context) {
log.Errorf("failed to read topo_zk_auth_file: %v", err)
return
}
authInfo := string(authInfoBytes)
authInfo := strings.TrimRight(string(authInfoBytes), "\n")
authInfoParts := strings.SplitN(authInfo, ":", 2)
if len(authInfoParts) != 2 {
log.Errorf("failed to parse topo_zk_auth_file contents, expected format <scheme>:<auth> but saw: %s", authInfo)
Expand Down

0 comments on commit 3412a34

Please sign in to comment.