Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Go modules #168

Merged
merged 5 commits into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
docker:
- image: circleci/golang:1.12
working_directory: /go/src/github.com/PagerDuty/go-pagerduty
working_directory: /go/src/github.com/pagerduty/go-pagerduty
steps:
- checkout
- run:
Expand Down
150 changes: 75 additions & 75 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang
ADD . /go/src/github.com/PagerDuty/go-pagerduty
WORKDIR /go/src/github.com/PagerDuty/go-pagerduty
ADD . /go/src/github.com/pagerduty/go-pagerduty
WORKDIR /go/src/github.com/pagerduty/go-pagerduty
RUN go get ./... && go test -v -race -cover ./...
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![GoDoc](https://godoc.org/github.com/PagerDuty/go-pagerduty?status.svg)](http://godoc.org/github.com/PagerDuty/go-pagerduty) [![Go Report Card](https://goreportcard.com/badge/github.com/PagerDuty/go-pagerduty)](https://goreportcard.com/report/github.com/PagerDuty/go-pagerduty) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gojp/goreportcard/blob/master/LICENSE)
[![GoDoc](https://godoc.org/github.com/pagerduty/go-pagerduty?status.svg)](http://godoc.org/github.com/pagerduty/go-pagerduty) [![Go Report Card](https://goreportcard.com/badge/github.com/pagerduty/go-pagerduty)](https://goreportcard.com/report/github.com/pagerduty/go-pagerduty) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/gojp/goreportcard/blob/master/LICENSE)
# go-pagerduty

go-pagerduty is a CLI and [go](https://golang.org/) client library for the [PagerDuty v2 API](https://v2.developer.pagerduty.com/v2/page/api-reference).
Expand All @@ -7,12 +7,12 @@ go-pagerduty is a CLI and [go](https://golang.org/) client library for the [Page

First, download the source code
```cli
go get github.com/PagerDuty/go-pagerduty
go get github.com/pagerduty/go-pagerduty
```

Next build the application.
```cli
cd $GOPATH/src/github.com/PagerDuty/go-pagerduty
cd $GOPATH/src/github.com/pagerduty/go-pagerduty
go build -o $GOPATH/bin/pd command/*
```
If you do not have the dependencies necessary to build the project, run this in the project root and try again
Expand Down Expand Up @@ -55,7 +55,7 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
"github.com/pagerduty/go-pagerduty"
)

var authtoken = "" // Set your auth token here
Expand All @@ -82,7 +82,7 @@ simply by setting a new value in the `HTTPClient` field.

## Contributing

1. Fork it ( https://github.com/PagerDuty/go-pagerduty/fork )
1. Fork it ( https://github.com/pagerduty/go-pagerduty/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
Expand Down
2 changes: 1 addition & 1 deletion command/addon_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions command/addon_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/addon_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion command/addon_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/addon_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"strings"
)
Expand Down
4 changes: 2 additions & 2 deletions command/escalation_policy_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/escalation_policy_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/escalation_policy_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/event_v2_manage.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

pagerduty "github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
pagerduty "github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions command/incident_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/maintenance_window_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"flag"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/go-homedir"
"gopkg.in/yaml.v2"
"io/ioutil"
Expand Down
4 changes: 2 additions & 2 deletions command/oncall_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
)
Expand Down
4 changes: 2 additions & 2 deletions command/schedule_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/schedule_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

yaml "gopkg.in/yaml.v2"

pagerduty "github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
pagerduty "github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions command/schedule_override_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/service_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/service_integration_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"encoding/json"
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"os"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/service_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/service_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/team_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion command/team_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
4 changes: 2 additions & 2 deletions command/user_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
)
Expand Down
4 changes: 2 additions & 2 deletions command/vendor_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
log "github.com/Sirupsen/logrus"
"github.com/pagerduty/go-pagerduty"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion command/vendor_show.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
log "github.com/Sirupsen/logrus"
log "github.com/sirupsen/logrus"
"github.com/mitchellh/cli"
"gopkg.in/yaml.v2"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion examples/escalation_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"fmt"
"github.com/PagerDuty/go-pagerduty"
"github.com/pagerduty/go-pagerduty"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion examples/event.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/PagerDuty/go-pagerduty"
"github.com/pagerduty/go-pagerduty"
"log"
)

Expand Down
11 changes: 11 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module github.com/pagerduty/go-pagerduty

go 1.12

require (
github.com/google/go-querystring v1.0.0
github.com/mitchellh/cli v1.0.0
github.com/mitchellh/go-homedir v1.1.0
github.com/sirupsen/logrus v1.4.2
gopkg.in/yaml.v2 v2.2.2
)
40 changes: 40 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=