From: Sebastian Harl Date: Wed, 13 May 2015 07:57:20 +0000 (+0200) Subject: Fixed compatibility issues with Go 1.0 and 1.1. X-Git-Url: https://git.tokkee.org/?p=sysdb%2Fgo.git;a=commitdiff_plain;h=HEAD Fixed compatibility issues with Go 1.0 and 1.1. --- diff --git a/client/client.go b/client/client.go index cae5443..e6a1303 100644 --- a/client/client.go +++ b/client/client.go @@ -175,6 +175,9 @@ func (c *Client) Call(req *proto.Message) (*proto.Message, error) { log.Println(string(res.Raw[4:])) } } + + // Not reached; needed for Go1 compatibility. + return nil, nil } // ServerVersion queries and returns the version of the remote server. diff --git a/client/query.go b/client/query.go index d1224f4..7bf5034 100644 --- a/client/query.go +++ b/client/query.go @@ -66,7 +66,7 @@ func stringify(values ...interface{}) ([]interface{}, error) { // string. Let's just assume that this pattern never occurs in a real query // string (or else, users will have to work around this by not using // QueryString()). -var badArgRE = regexp.MustCompile(`%!.?\(.+`) +var badArgRE = regexp.MustCompile(`%!?[A-Za-z]?\(.+`) // QueryString formats a query string. The query q may include printf string // verbs (%s) for each argument. The arguments may be of type Identifier,