minor cleanup; add golint to travis-ci
This commit is contained in:
parent
63ae092b97
commit
c4aa30561d
@ -6,8 +6,10 @@ go:
|
|||||||
- tip
|
- tip
|
||||||
before_install:
|
before_install:
|
||||||
- go get -u -v github.com/mattn/goveralls
|
- go get -u -v github.com/mattn/goveralls
|
||||||
|
- go get -u -v github.com/golang/lint/golint
|
||||||
script:
|
script:
|
||||||
- $HOME/gopath/bin/goveralls -service=travis-ci -v
|
- $HOME/gopath/bin/goveralls -service=travis-ci -v
|
||||||
|
- $HOME/gopath/bin/golint -min_confidence 0.3 | grep -v ALL_CAPS && exit 1
|
||||||
- go tool vet -v -all .
|
- go tool vet -v -all .
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
6
conn.go
6
conn.go
@ -75,15 +75,15 @@ func newConn(conf Config, addr string) (*ircConn, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if conf.Proxy != "" {
|
if conf.Proxy != "" {
|
||||||
var proxyUri *url.URL
|
var proxyURI *url.URL
|
||||||
var proxyDialer proxy.Dialer
|
var proxyDialer proxy.Dialer
|
||||||
|
|
||||||
proxyUri, err = url.Parse(conf.Proxy)
|
proxyURI, err = url.Parse(conf.Proxy)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to use proxy %q: %s", conf.Proxy, err)
|
return nil, fmt.Errorf("unable to use proxy %q: %s", conf.Proxy, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
proxyDialer, err = proxy.FromURL(proxyUri, dialer)
|
proxyDialer, err = proxy.FromURL(proxyURI, dialer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to use proxy %q: %s", conf.Proxy, err)
|
return nil, fmt.Errorf("unable to use proxy %q: %s", conf.Proxy, err)
|
||||||
}
|
}
|
||||||
|
2
event.go
2
event.go
@ -97,7 +97,7 @@ func ParseEvent(raw string) (e *Event) {
|
|||||||
// Find prefix for trailer.
|
// Find prefix for trailer.
|
||||||
i = bytes.Index([]byte(raw[j:]), []byte{eventSpace, messagePrefix})
|
i = bytes.Index([]byte(raw[j:]), []byte{eventSpace, messagePrefix})
|
||||||
if i != -1 {
|
if i != -1 {
|
||||||
i += 1
|
i++
|
||||||
}
|
}
|
||||||
|
|
||||||
if i < 0 || raw[j+i-1] != eventSpace {
|
if i < 0 || raw[j+i-1] != eventSpace {
|
||||||
|
Loading…
Reference in New Issue
Block a user