fix mispell (#54)

* fix mispell

* update golint path in travis

* Golint requires Go 1.9 or later

* install golint only if go >=1.9

* exclude go 1.7 and go 1.8 for golint

* add build on go 1.10.x
This commit is contained in:
Cyrille Hemidy
2018-10-24 23:55:16 +02:00
committed by Sebastian Zagrodzki
parent 15d2fa288b
commit 593cfb67e9
5 changed files with 13 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
- 1.10.x
- tip
addons:
@@ -14,13 +15,15 @@ addons:
install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/golang/lint/golint
# Golint requires Go 1.9 or later.
- if ! [[ "$TRAVIS_GO_VERSION" =~ ^1\.7\.([0-9]+|x)$ || "$TRAVIS_GO_VERSION" =~ ^1\.8\.([0-9]+|x)$ ]]; then go get golang.org/x/lint/golint; fi
- go get github.com/mattn/goveralls
script:
# a workaround for go test not supporting coverage for multiple packages in a single invocation.
# If goveralls upload fails, ignore the result.
- $HOME/gopath/bin/golint ./...
# Golint requires Go 1.9 or later.
- if ! [[ "$TRAVIS_GO_VERSION" =~ ^1\.7\.([0-9]+|x)+$ || "$TRAVIS_GO_VERSION" =~ ^1\.8\.([0-9]+|x)$ ]]; then $HOME/gopath/bin/golint ./...; fi
- |-
echo 'mode: count' > coverage.merged && go list ./... | xargs -n1 -I{} sh -c ': > coverage.tmp; go test -v -covermode=count -coverprofile=coverage.tmp {} && tail -n +2 coverage.tmp >> coverage.merged' && rm coverage.tmp
- |-

View File

@@ -28,7 +28,7 @@ type DeviceDesc struct {
Bus int // The bus on which the device was detected
Address int // The address of the device on the bus
Speed Speed // The negotiated operating speed for the device
Port int // The usb port on which the device was detected
Port int // The usb port on which the device was detected
// Version information
Spec BCD // USB Specification Release Number

View File

@@ -65,7 +65,7 @@ func Example_simple() {
if numBytes != 5 {
log.Fatalf("%s.Write([5]): only %d bytes written, returned error is %v", ep, numBytes, err)
}
fmt.Println("5 bytes successfuly sent to the endpoint")
fmt.Println("5 bytes successfully sent to the endpoint")
}
// This example demostrates the full API for accessing endpoints.
@@ -138,7 +138,7 @@ func Example_complex() {
if readBytes == 0 {
log.Fatalf("IN endpoint 6 returned 0 bytes of data.")
}
// writeBytes might be smaller than the buffer size if an error occured. writeBytes might be greater than zero even if err is not nil.
// writeBytes might be smaller than the buffer size if an error occurred. writeBytes might be greater than zero even if err is not nil.
writeBytes, err := epOut.Write(buf[:readBytes])
if err != nil {
fmt.Println("Write returned an error:", err)

View File

@@ -30,7 +30,7 @@ type InterfaceDesc struct {
AltSettings []InterfaceSetting
}
// String returns a human-readable descripton of the interface descriptor and
// String returns a human-readable description of the interface descriptor and
// its alternate settings.
func (i InterfaceDesc) String() string {
return fmt.Sprintf("Interface %d (%d alternate settings)", i.Number, len(i.AltSettings))
@@ -65,7 +65,7 @@ func (a InterfaceSetting) sortedEndpointIds() []string {
return eps
}
// String returns a human-readable descripton of the particular
// String returns a human-readable description of the particular
// alternate setting of an interface.
func (a InterfaceSetting) String() string {
return fmt.Sprintf("Interface %d alternate setting %d (available endpoints: %v)", a.Number, a.Alternate, a.sortedEndpointIds())

View File

@@ -224,8 +224,8 @@ func (w *WriteStream) Write(p []byte) (int, error) {
// Close signals end of data to write. Close blocks until all transfers
// that were sent are finished. The error returned by Close is the first
// error encountered during writing the entire stream (if any).
// Close returning nil indicates all transfers completed successfuly.
// After Close, the total number of bytes successfuly written can be
// Close returning nil indicates all transfers completed successfully.
// After Close, the total number of bytes successfully written can be
// retrieved using Written().
// Close may not be called concurrently with Write, Close or Written.
func (w *WriteStream) Close() error {
@@ -247,7 +247,7 @@ func (w *WriteStream) Close() error {
return w.s.err
}
// Written returns the number of bytes successfuly written by the stream.
// Written returns the number of bytes successfully written by the stream.
// Written may be called only after Close() has been called and returned.
func (w *WriteStream) Written() int {
return w.total