Skip to content

Commit

Permalink
update to Go 1.13.1 (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanericky authored Oct 11, 2019
1 parent 73dfaf4 commit aeec824
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- 1.12.x
- 1.13.x

# Only clone the most recent commit.
git:
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
VERSION_INJECT=main.versionText
SRCS=*.go cmd/*.go
PACKAGE=cmd/*.go
export GO111MODULE=on

EXECUTABLE=bin/pushover

Expand All @@ -18,7 +17,7 @@ WINDOWS_386=$(WINDOWS)-386.exe

.PHONY: all test clean

all: test build
all: build

build: linux-amd64 windows-amd64 darwin-amd64 linux-386 windows-386

Expand Down
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,31 @@ The Pushover service is a great way to send notifications to your device for any

Obtaining a Pushover account and adding an application for using this library are not covered in this README. Pushover API and user tokens are required.

To use this Pushover package, just import it and make a single call to `pushover.Message`.
To use this Pushover package (with Go 1.13+), just import it and make a single call to `pushover.Message`.

```
$ cat > main.go << EOF
package main
import (
"context"
"fmt"
"os"
"github.com/arcanericky/pushover"
"fmt"
"os"
"github.com/arcanericky/pushover"
)
func main() {
var r *pushover.MessageResponse
var e error
if r, e = pushover.Message(pushover.MessageRequest{
Token: os.Args[1], User: os.Args[2], Message: os.Args[3]},
); e != nil {
fmt.Println(e)
return
}
fmt.Println(r)
var r *pushover.MessageResponse
var e error
if r, e = pushover.Message(pushover.MessageRequest{Token: os.Args[1], User: os.Args[2], Message: os.Args[3]}); e != nil {
fmt.Println(e)
return
}
fmt.Println(r)
}
EOF
$ GO111MOD=on go mod init demo
$ GO111MOD=on go build
$ go mod init demo
$ go build
$ ./demo api-token user-token "Test Message"
```

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/arcanericky/pushover

go 1.12
go 1.13

require (
github.com/spf13/cobra v0.0.5
golang.org/x/net v0.0.0-20190628185345-da137c7871d7
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnf
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0 h1:2mqDk8w/o6UmeUCu5Qiq2y7iMf6anbx+YA8d1JFoFrs=
golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down

0 comments on commit aeec824

Please sign in to comment.