From 0465bf66cfcb255aad9360086dc8890d04c4b973 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 00:33:46 +0300 Subject: [PATCH 01/41] Replace Travis with GitHub action --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 27 --------------------------- 2 files changed, 33 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..45bd1bb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +on: [push, pull_request] +name: CI +jobs: + test: + strategy: + matrix: + go-version: [1.13.x, 1.14.x] + platform: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: gofmt + run: diff -u <(echo -n) <(gofmt -d -s .) + - name: golint + run: | + go get -u golang.org/x/lint/golint + golint `go list ./... | grep -v /vendor/` + - name: go vet + run: go vet ./... + - name: Run tests with the race detector + run: go test -v -race ./... + - name: Generate test coverage + run: go test -covermode=count -coverprofile=coverage.out ./... + - name: Upload test coverage to CodeCov + uses: codecov/codecov-action@v1.0.0 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: coverage.out diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 17ca73b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: go -sudo: false - -go: - - 1.14.x - - master - -matrix: - allow_failures: - - go: master - fast_finish: true - -before_install: - - go get golang.org/x/lint/golint - - go get github.com/mattn/goveralls - -install: - - # Skip - -script: - - go get -t -v ./... - - diff -u <(echo -n) <(gofmt -d -s .) - - golint `go list ./... | grep -v /vendor/` - - go vet ./... - - go test -v -race ./... - - go test -covermode=count -coverprofile=coverage.out ./... - - goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN From 5fdb08b391611ebaaca04858a3e0206fab58f2ee Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 00:38:02 +0300 Subject: [PATCH 02/41] Fix codecov action version --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45bd1bb..01a090c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Generate test coverage run: go test -covermode=count -coverprofile=coverage.out ./... - name: Upload test coverage to CodeCov - uses: codecov/codecov-action@v1.0.0 + uses: codecov/codecov-action@v1 with: - token: ${{secrets.CODECOV_TOKEN}} + token: ${{ secrets.CODECOV_TOKEN }} file: coverage.out From fa751f70609b762b16b5cf55eab5e929c4486159 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 00:39:46 +0300 Subject: [PATCH 03/41] Fix uses indentation in GitHub action --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01a090c..214e4b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Generate test coverage run: go test -covermode=count -coverprofile=coverage.out ./... - name: Upload test coverage to CodeCov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} file: coverage.out From b46ff1195080cb5bbde34b9abe444974b41706f1 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 00:41:26 +0300 Subject: [PATCH 04/41] Fix more indentation --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 214e4b8..94f67ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,6 @@ jobs: run: go test -covermode=count -coverprofile=coverage.out ./... - name: Upload test coverage to CodeCov uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: coverage.out + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: coverage.out From 1ef3d6ba1351f983e556b30ef66f4ca3c43c6d7e Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:02:41 +0300 Subject: [PATCH 05/41] Remove Go 1.13 from CI action --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94f67ca..0d4ec6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ jobs: test: strategy: matrix: - go-version: [1.13.x, 1.14.x] + go-version: [1.14.x] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: @@ -16,6 +16,7 @@ jobs: uses: actions/checkout@v2 - name: gofmt run: diff -u <(echo -n) <(gofmt -d -s .) + shell: bash - name: golint run: | go get -u golang.org/x/lint/golint From 0686af9a66ff8ff63f9fb7a3702975588c0dc9b5 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:03:46 +0300 Subject: [PATCH 06/41] Display codecov and github actions on README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2eae8c5..38ca999 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ go-myanimelist is a Go client library for accessing the [MyAnimeList API](http:/ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![GoDoc](https://godoc.org/github.com/nstratos/go-myanimelist/mal?status.svg)](https://godoc.org/github.com/nstratos/go-myanimelist/mal) [![Go Report Card](https://goreportcard.com/badge/github.com/nstratos/go-myanimelist)](https://goreportcard.com/report/github.com/nstratos/go-myanimelist) -[![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=master)](https://coveralls.io/github/nstratos/go-myanimelist?branch=master) -[![Build Status](https://travis-ci.org/nstratos/go-myanimelist.svg?branch=master)](https://travis-ci.org/nstratos/go-myanimelist) +[![Coverage Status](https://codecov.io/gh/nstratos/go-myanimelist/branch/master/graph/badge.svg)](https://codecov.io/gh/nstratos/go-myanimelist) +[![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/CI/badge.svg)](https://github.com/nstratos/go-myanimelist/actions) ## Project Status From de81220d0ea985dd02079329a201a67ecbca7ea4 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:32:20 +0300 Subject: [PATCH 07/41] Exit 1 when gofmt finds unformatted code --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d4ec6b..889c937 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: diff -u <(echo -n) <(gofmt -d -s .) + run: [ -z $gofmt -s -l .) ] || (gofmt -s -d . && exit 1) shell: bash - name: golint run: | From d69489bf5c6f259767687198c374ac392a48c34a Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:34:05 +0300 Subject: [PATCH 08/41] Fix gofmt command in CI action --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 889c937..8f2618f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: [ -z $gofmt -s -l .) ] || (gofmt -s -d . && exit 1) + run: [ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1) shell: bash - name: golint run: | From d1a0a2ac4b413bd586093475c37f5b7ae0d8955c Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:36:55 +0300 Subject: [PATCH 09/41] Invoke bash --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f2618f..75100a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: [ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1) + run: bash [ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1) shell: bash - name: golint run: | From 7505ab65cd563b101281d1ac94907ad23e2a190d Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:40:55 +0300 Subject: [PATCH 10/41] Use double quotes --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75100a2..eaad181 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: bash [ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1) + run: "[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)" shell: bash - name: golint run: | From 118a9890944e0ef5b24fcb52f5e18282020ed841 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 01:52:46 +0300 Subject: [PATCH 11/41] Try old gofmt check command --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaad181..1a276fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: "[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)" + run: "diff -u <(echo -n) <(gofmt -d -s .)" shell: bash - name: golint run: | From ddde2f0cd53e6ecfe281c9782b4b92c1ad79a37d Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:05:47 +0300 Subject: [PATCH 12/41] Remove gofmt -d does not play on Windows --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a276fb..d62bf21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: "diff -u <(echo -n) <(gofmt -d -s .)" + run: test -z $(gofmt -s -l .) shell: bash - name: golint run: | From ea413684e95d8d4149859c4691cc8b7704c8e401 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:08:52 +0300 Subject: [PATCH 13/41] Use single quotes --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d62bf21..d413e3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: test -z $(gofmt -s -l .) + run: 'test -z $(gofmt -s -l .)' shell: bash - name: golint run: | From 7e8dd83c2e2dd9e74578b8056cd570040bb009b9 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:12:06 +0300 Subject: [PATCH 14/41] Fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d413e3b..e171a79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: 'test -z $(gofmt -s -l .)' + run: test -z "$(gofmt -s -l .)" shell: bash - name: golint run: | From 0bcf77b75d1d422e93308215bd59828887563052 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:15:03 +0300 Subject: [PATCH 15/41] windows fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e171a79..72355ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: test -z "$(gofmt -s -l .)" + run: "[ -z $(gofmt -s -l .) ]" shell: bash - name: golint run: | From 9125015ca7a5544c45148ba060ab5745423aa92b Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:31:20 +0300 Subject: [PATCH 16/41] Fix fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72355ce..77ef26e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: "[ -z $(gofmt -s -l .) ]" + run: 'result=$(gofmt -s -l .) && [ -z "$result" ]' shell: bash - name: golint run: | From 1cb3eb7f3421ed04b6788a51c7c55703c5d112bc Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:42:25 +0300 Subject: [PATCH 17/41] Get rid of windows --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77ef26e..8609f80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: strategy: matrix: go-version: [1.14.x] - platform: [ubuntu-latest, macos-latest, windows-latest] + platform: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.platform }} steps: - name: Install Go @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: 'result=$(gofmt -s -l .) && [ -z "$result" ]' + run: '[ -z $gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' shell: bash - name: golint run: | From b504ff1d6e4dc336f355e74e27702cce0c2d0966 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Fri, 5 Jun 2020 02:44:06 +0300 Subject: [PATCH 18/41] Add missing parenthesis --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8609f80..9e3d03d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - name: gofmt - run: '[ -z $gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' + run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' shell: bash - name: golint run: | From 0c349fbc530678f2899f1d03f532753508c57dba Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Sat, 6 Jun 2020 15:45:30 +0300 Subject: [PATCH 19/41] Upload test coverate to Coveralls --- .github/workflows/ci.yml | 6 ++++++ README.md | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e3d03d..1be28aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,3 +32,9 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} file: coverage.out + - name: Upload test coverage to Coveralls + env: + COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + GO111MODULE=off go get github.com/mattn/goveralls + $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github diff --git a/README.md b/README.md index 38ca999..dd5ba92 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ go-myanimelist is a Go client library for accessing the [MyAnimeList API](http:/ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![GoDoc](https://godoc.org/github.com/nstratos/go-myanimelist/mal?status.svg)](https://godoc.org/github.com/nstratos/go-myanimelist/mal) [![Go Report Card](https://goreportcard.com/badge/github.com/nstratos/go-myanimelist)](https://goreportcard.com/report/github.com/nstratos/go-myanimelist) -[![Coverage Status](https://codecov.io/gh/nstratos/go-myanimelist/branch/master/graph/badge.svg)](https://codecov.io/gh/nstratos/go-myanimelist) +[![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=master)](https://coveralls.io/github/nstratos/go-myanimelist?branch=master) [![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/CI/badge.svg)](https://github.com/nstratos/go-myanimelist/actions) ## Project Status From 02ad8d9d55054b55de8bd821491ef7c8d1b03513 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Tue, 23 Mar 2021 01:35:29 +0200 Subject: [PATCH 20/41] Move stub server in separate example file --- mal/example_anime_test.go | 68 ------------------------------------ mal/example_test.go | 73 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 68 deletions(-) create mode 100644 mal/example_test.go diff --git a/mal/example_anime_test.go b/mal/example_anime_test.go index b2e9625..76cba60 100644 --- a/mal/example_anime_test.go +++ b/mal/example_anime_test.go @@ -2,13 +2,8 @@ package mal_test import ( "context" - "embed" _ "embed" "fmt" - "io" - "io/fs" - "net/http" - "net/http/httptest" "net/url" "strings" @@ -16,69 +11,6 @@ import ( "golang.org/x/oauth2" ) -//go:embed testdata/*.json -var testDataJSON embed.FS - -// newStubServer creates a stub server which serves some premade responses. By -// contacting this server instead of the real API we can have runnable examples -// which always produce the same output. -func newStubServer() *httptest.Server { - mux := http.NewServeMux() - server := httptest.NewServer(mux) - - serveStubFile := func(w io.Writer, filename string) error { - stubResponses, err := fs.Sub(testDataJSON, "testdata") - if err != nil { - return err - } - f, err := stubResponses.Open(filename) - if err != nil { - return err - } - if _, err := io.Copy(w, f); err != nil { - return err - } - return nil - } - - serveStubHandler := func(filename string) func(w http.ResponseWriter, r *http.Request) { - return func(w http.ResponseWriter, r *http.Request) { - malError := func(err string) string { - return fmt.Sprintf(`{"message": "", "error":"%s"}`, err) - } - switch r.Method { - case http.MethodDelete: - w.WriteHeader(http.StatusOK) - case http.MethodGet, http.MethodPatch: - if err := serveStubFile(w, filename); err != nil { - http.Error(w, malError("internal"), http.StatusInternalServerError) - } - default: - http.Error(w, malError("not_allowed"), http.StatusMethodNotAllowed) - } - } - } - - mux.HandleFunc("/anime", serveStubHandler("animeList.json")) - mux.HandleFunc("/anime/967", serveStubHandler("animeDetails.json")) - mux.HandleFunc("/anime/967/my_list_status", serveStubHandler("updateMyAnimeList.json")) - mux.HandleFunc("/anime/ranking", serveStubHandler("animeRanking.json")) - mux.HandleFunc("/anime/season/2020/fall", serveStubHandler("animeSeasonal.json")) - mux.HandleFunc("/anime/suggestions", serveStubHandler("animeSuggested.json")) - mux.HandleFunc("/manga", serveStubHandler("mangaList.json")) - mux.HandleFunc("/manga/401", serveStubHandler("mangaDetails.json")) - mux.HandleFunc("/manga/401/my_list_status", serveStubHandler("updateMyMangaList.json")) - mux.HandleFunc("/manga/ranking", serveStubHandler("mangaRanking.json")) - mux.HandleFunc("/users/@me", serveStubHandler("userMyInfo.json")) - mux.HandleFunc("/users/@me/animelist", serveStubHandler("userAnimeList.json")) - mux.HandleFunc("/users/@me/mangalist", serveStubHandler("userMangaList.json")) - mux.HandleFunc("/forum/boards", serveStubHandler("forumBoards.json")) - mux.HandleFunc("/forum/topics", serveStubHandler("forumTopics.json")) - mux.HandleFunc("/forum/topic/1877721", serveStubHandler("forumTopicDetails.json")) - - return server -} - func ExampleAnimeService_List() { ctx := context.Background() c := mal.NewClient( diff --git a/mal/example_test.go b/mal/example_test.go new file mode 100644 index 0000000..3d01876 --- /dev/null +++ b/mal/example_test.go @@ -0,0 +1,73 @@ +package mal_test + +import ( + "embed" + "fmt" + "io" + "io/fs" + "net/http" + "net/http/httptest" +) + +//go:embed testdata/*.json +var testDataJSON embed.FS + +// newStubServer creates a stub server which serves some premade responses. By +// contacting this server instead of the real API we can have runnable examples +// which always produce the same output. +func newStubServer() *httptest.Server { + mux := http.NewServeMux() + server := httptest.NewServer(mux) + + serveStubFile := func(w io.Writer, filename string) error { + stubResponses, err := fs.Sub(testDataJSON, "testdata") + if err != nil { + return err + } + f, err := stubResponses.Open(filename) + if err != nil { + return err + } + if _, err := io.Copy(w, f); err != nil { + return err + } + return nil + } + + serveStubHandler := func(filename string) func(w http.ResponseWriter, r *http.Request) { + return func(w http.ResponseWriter, r *http.Request) { + malError := func(err string) string { + return fmt.Sprintf(`{"message": "", "error":"%s"}`, err) + } + switch r.Method { + case http.MethodDelete: + w.WriteHeader(http.StatusOK) + case http.MethodGet, http.MethodPatch: + if err := serveStubFile(w, filename); err != nil { + http.Error(w, malError("internal"), http.StatusInternalServerError) + } + default: + http.Error(w, malError("not_allowed"), http.StatusMethodNotAllowed) + } + } + } + + mux.HandleFunc("/anime", serveStubHandler("animeList.json")) + mux.HandleFunc("/anime/967", serveStubHandler("animeDetails.json")) + mux.HandleFunc("/anime/967/my_list_status", serveStubHandler("updateMyAnimeList.json")) + mux.HandleFunc("/anime/ranking", serveStubHandler("animeRanking.json")) + mux.HandleFunc("/anime/season/2020/fall", serveStubHandler("animeSeasonal.json")) + mux.HandleFunc("/anime/suggestions", serveStubHandler("animeSuggested.json")) + mux.HandleFunc("/manga", serveStubHandler("mangaList.json")) + mux.HandleFunc("/manga/401", serveStubHandler("mangaDetails.json")) + mux.HandleFunc("/manga/401/my_list_status", serveStubHandler("updateMyMangaList.json")) + mux.HandleFunc("/manga/ranking", serveStubHandler("mangaRanking.json")) + mux.HandleFunc("/users/@me", serveStubHandler("userMyInfo.json")) + mux.HandleFunc("/users/@me/animelist", serveStubHandler("userAnimeList.json")) + mux.HandleFunc("/users/@me/mangalist", serveStubHandler("userMangaList.json")) + mux.HandleFunc("/forum/boards", serveStubHandler("forumBoards.json")) + mux.HandleFunc("/forum/topics", serveStubHandler("forumTopics.json")) + mux.HandleFunc("/forum/topic/1877721", serveStubHandler("forumTopicDetails.json")) + + return server +} From 196842e7c92c3ec4a0d5948fbf2f57ae9df53dd4 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Tue, 23 Mar 2021 02:09:17 +0200 Subject: [PATCH 21/41] Move badges higher on README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6f5bc78..c231422 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # go-myanimelist -go-myanimelist is a Go client library for accessing the [MyAnimeList API v2](https://myanimelist.net/apiconfig/references/api/v2). - -[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Go Reference](https://pkg.go.dev/badge/github.com/nstratos/go-myanimelist/mal.svg)](https://pkg.go.dev/github.com/nstratos/go-myanimelist/mal) +[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/nstratos/go-myanimelist)](https://goreportcard.com/report/github.com/nstratos/go-myanimelist) [![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=master)](https://coveralls.io/github/nstratos/go-myanimelist?branch=master) [![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/CI/badge.svg)](https://github.com/nstratos/go-myanimelist/actions) +go-myanimelist is a Go client library for accessing the [MyAnimeList API v2](https://myanimelist.net/apiconfig/references/api/v2). + ## Project Status The project has been updated to support MyAnimeList API v2. From 24c78503833e883cba2ebfaf82fcda2899c5c13e Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 21:59:20 +0200 Subject: [PATCH 22/41] Remove codecov and combine go test in one command --- .github/workflows/ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1be28aa..862ac85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,15 +23,10 @@ jobs: golint `go list ./... | grep -v /vendor/` - name: go vet run: go vet ./... - - name: Run tests with the race detector - run: go test -v -race ./... - - name: Generate test coverage - run: go test -covermode=count -coverprofile=coverage.out ./... - - name: Upload test coverage to CodeCov - uses: codecov/codecov-action@v1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - file: coverage.out + + - name: Run go test + run: go test -v -race -covermode=count -coverprofile=coverage.out ./... + - name: Upload test coverage to Coveralls env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 04224e1c05f332518cce15a744ab5f2182fe0433 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:00:22 +0200 Subject: [PATCH 23/41] Run with latest Go version and only on ubuntu --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 862ac85..873ff1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,10 @@ jobs: test: strategy: matrix: - go-version: [1.14.x] - platform: [ubuntu-latest, macos-latest] + go-version: [1.x] + platform: [ubuntu-latest] runs-on: ${{ matrix.platform }} + steps: - name: Install Go uses: actions/setup-go@v2 From 3ba4fd396e4ad33084560b2d4cb426907ddb60cc Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:01:01 +0200 Subject: [PATCH 24/41] Cache and verify modules --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 873ff1d..17d2be9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,19 @@ jobs: uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} + - name: Checkout code uses: actions/checkout@v2 - - name: gofmt + + - name: Cache go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Mod verify + run: go mod verify run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' shell: bash - name: golint From 189311c8869aeee4d1098236973939194811319b Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:01:31 +0200 Subject: [PATCH 25/41] Avoid gofmt on windows --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 17d2be9..46c6773 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,13 +26,17 @@ jobs: - name: Mod verify run: go mod verify + + - name: Run gofmt + if: runner.os != 'Windows' run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' - shell: bash - - name: golint + + - name: Run golint run: | go get -u golang.org/x/lint/golint golint `go list ./... | grep -v /vendor/` - - name: go vet + + - name: Run go vet run: go vet ./... - name: Run go test From d5f4e0e8a8552a4479fb8c4248acc1733dffe848 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:02:38 +0200 Subject: [PATCH 26/41] Change action name to tests --- .github/workflows/ci.yml | 3 ++- README.md | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46c6773..7541c5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,6 @@ on: [push, pull_request] -name: CI +name: tests + jobs: test: strategy: diff --git a/README.md b/README.md index c231422..6ec7c50 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/nstratos/go-myanimelist/mal.svg)](https://pkg.go.dev/github.com/nstratos/go-myanimelist/mal) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/nstratos/go-myanimelist)](https://goreportcard.com/report/github.com/nstratos/go-myanimelist) -[![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=master)](https://coveralls.io/github/nstratos/go-myanimelist?branch=master) -[![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/CI/badge.svg)](https://github.com/nstratos/go-myanimelist/actions) +[![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/tests/badge.svg)](https://github.com/nstratos/go-myanimelist/actions) go-myanimelist is a Go client library for accessing the [MyAnimeList API v2](https://myanimelist.net/apiconfig/references/api/v2). From 56af91af92ee2ff418a2d9e0e9f9c1db2b014778 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:02:58 +0200 Subject: [PATCH 27/41] Make coveralls badge show main branch --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6ec7c50..e071ec9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/nstratos/go-myanimelist/mal.svg)](https://pkg.go.dev/github.com/nstratos/go-myanimelist/mal) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/nstratos/go-myanimelist)](https://goreportcard.com/report/github.com/nstratos/go-myanimelist) +[![Coverage Status](https://coveralls.io/repos/github/nstratos/go-myanimelist/badge.svg?branch=main)](https://coveralls.io/github/nstratos/go-myanimelist?branch=main) [![Actions Status](https://github.com/nstratos/go-myanimelist/workflows/tests/badge.svg)](https://github.com/nstratos/go-myanimelist/actions) go-myanimelist is a Go client library for accessing the [MyAnimeList API v2](https://myanimelist.net/apiconfig/references/api/v2). From c859dd61a5acfb67a5130f4d241d41fd5ea1e3c3 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:03:27 +0200 Subject: [PATCH 28/41] Change filename of action from ci to tests --- .github/workflows/{ci.yml => tests.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ci.yml => tests.yml} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/tests.yml similarity index 100% rename from .github/workflows/ci.yml rename to .github/workflows/tests.yml From 1ddb44b58ac63f69b675192c12d81db1fb8d9a1b Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:09:27 +0200 Subject: [PATCH 29/41] Upload coverage only once --- .github/workflows/tests.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7541c5a..ab08707 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,6 +7,11 @@ jobs: matrix: go-version: [1.x] platform: [ubuntu-latest] + include: + # Upload coverage only on this combination. + - go-version: 1.x + platform: ubuntu-latest + upload-coverage: true runs-on: ${{ matrix.platform }} steps: @@ -44,6 +49,7 @@ jobs: run: go test -v -race -covermode=count -coverprofile=coverage.out ./... - name: Upload test coverage to Coveralls + if: ${{ matrix.upload-coverage }} env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | From 208bae0bd4576580b8983004e4dcd9193bbb3d8a Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:12:01 +0200 Subject: [PATCH 30/41] Fix indentation --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ab08707..e7599f0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,8 +10,8 @@ jobs: include: # Upload coverage only on this combination. - go-version: 1.x - platform: ubuntu-latest - upload-coverage: true + platform: ubuntu-latest + upload-coverage: true runs-on: ${{ matrix.platform }} steps: From 7564d8ad8f994f5a424849b74006127b8eeb9bd8 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:25:04 +0200 Subject: [PATCH 31/41] Run go mod tidy --- go.sum | 63 ---------------------------------------------------------- 1 file changed, 63 deletions(-) diff --git a/go.sum b/go.sum index a419971..82bfdb1 100644 --- a/go.sum +++ b/go.sum @@ -12,65 +12,44 @@ cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bP cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= -cloud.google.com/go v0.65.0 h1:Dg9iHVQfrhq82rUNu9ZxUDrJLaxFUe/HlCVaLyRruq8= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4 h1:rEvIZUSZ3fx39WIi3JkQqQBitGwpELBIYWeBVh6wn+E= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -78,7 +57,6 @@ github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFU github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= -github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -95,7 +73,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -105,9 +82,7 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/martian/v3 v3.0.0 h1:pMen7vLs8nvgEYhywH3KDWJIJTeEr2ULsVWHWYHQyBs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -115,54 +90,36 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99 h1:Ak8CrdlwwXwAZxzS66vgPt4U8yUZX7JwLvVR58FN5jM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6 h1:UDMh68UUwekSh5iP2OMhRRZJiiBccgV7axzUG8vi56c= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -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/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.1.32 h1:5tjfNdR2ki3yYQ842+eX2sQHeiwpKJ0RnHO4IYOc4V8= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opencensus.io v0.22.4 h1:LYy1Hy3MJdrCdMwwzxA/dRok4ejH+RwNGbuoD9fCjto= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -173,10 +130,8 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -187,17 +142,14 @@ golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -240,7 +192,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -266,17 +217,14 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -317,7 +265,6 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200825202427-b303f430e36d h1:W07d4xkoAUSNOkOzdzXCdFGxT7o2rW4q8M34tB2i//k= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -339,7 +286,6 @@ google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/ google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= -google.golang.org/api v0.30.0 h1:yfrXXP61wVuLb0vBcG6qaOoIoqYEzOQS8jum51jkv2w= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -376,7 +322,6 @@ google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEY google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 h1:PDIOdWxZ8eRizhKa1AAvY53xsvLB1cWorMjslvY3VA8= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -389,7 +334,6 @@ google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8 google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -403,11 +347,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -415,11 +356,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= From 38fa5daa686f3fc929d4f6e9dc709de892ab0089 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:27:56 +0200 Subject: [PATCH 32/41] Remove cache of go modules --- .github/workflows/tests.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7599f0..0df0153 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,13 +23,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Cache go modules - uses: actions/cache@v2 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: ${{ runner.os }}-go- - - name: Mod verify run: go mod verify From 5f5394f9ba07291f334bff96a3e8e34c26e172e3 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:31:39 +0200 Subject: [PATCH 33/41] Download modules first --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0df0153..6bfe8b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,6 +23,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Download modules + run: go mod download + - name: Mod verify run: go mod verify From ca794e4678263c4c1322b8561bd9d59e6274b293 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:36:32 +0200 Subject: [PATCH 34/41] Move go vet before golint --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6bfe8b8..7161ab8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: - name: Download modules run: go mod download - + - name: Mod verify run: go mod verify @@ -33,14 +33,14 @@ jobs: if: runner.os != 'Windows' run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' + - name: Run go vet + run: go vet ./... + - name: Run golint run: | go get -u golang.org/x/lint/golint golint `go list ./... | grep -v /vendor/` - - name: Run go vet - run: go vet ./... - - name: Run go test run: go test -v -race -covermode=count -coverprofile=coverage.out ./... From 7704a341768adfd75959e1d9122e5756a4efdb0c Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:46:57 +0200 Subject: [PATCH 35/41] Revert "Move go vet before golint" This reverts commit ca794e4678263c4c1322b8561bd9d59e6274b293. --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7161ab8..6bfe8b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -25,7 +25,7 @@ jobs: - name: Download modules run: go mod download - + - name: Mod verify run: go mod verify @@ -33,14 +33,14 @@ jobs: if: runner.os != 'Windows' run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' - - name: Run go vet - run: go vet ./... - - name: Run golint run: | go get -u golang.org/x/lint/golint golint `go list ./... | grep -v /vendor/` + - name: Run go vet + run: go vet ./... + - name: Run go test run: go test -v -race -covermode=count -coverprofile=coverage.out ./... From 605559966282d0dac08eb3125f6ad888743ef18e Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:47:59 +0200 Subject: [PATCH 36/41] Use go install instead of go get -u for golint --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6bfe8b8..ed13bc0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: - name: Run golint run: | - go get -u golang.org/x/lint/golint + go install golang.org/x/lint/golint golint `go list ./... | grep -v /vendor/` - name: Run go vet From 3a0a488bf53192169ace848aafe51ebc2a976b32 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:56:49 +0200 Subject: [PATCH 37/41] Remove download of go modules --- .github/workflows/tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed13bc0..4cf1745 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,9 +23,6 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Download modules - run: go mod download - - name: Mod verify run: go mod verify From 11a723f540e501b7333829eac2d4898292ab6264 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:57:16 +0200 Subject: [PATCH 38/41] Revert "Remove cache of go modules" This reverts commit 38fa5daa686f3fc929d4f6e9dc709de892ab0089. --- .github/workflows/tests.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4cf1745..6d88c48 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,6 +23,13 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Cache go modules + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + - name: Mod verify run: go mod verify From 769844dd101d1f9861d49aecdd11b98dedcb96a4 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 22:58:29 +0200 Subject: [PATCH 39/41] Use covermode atomic to play together with -race --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d88c48..cc5600e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,7 +46,7 @@ jobs: run: go vet ./... - name: Run go test - run: go test -v -race -covermode=count -coverprofile=coverage.out ./... + run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./... - name: Upload test coverage to Coveralls if: ${{ matrix.upload-coverage }} From 4586de0dd8560d94219c00bbcdb297a678005f77 Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 23:03:20 +0200 Subject: [PATCH 40/41] Add again download modules --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cc5600e..a1579b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,6 +23,9 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Download modules + run: go mod download + - name: Cache go modules uses: actions/cache@v2 with: From 5be2fe056a748524f392e769fa94e5107bcffece Mon Sep 17 00:00:00 2001 From: Stratos Neiros Date: Wed, 24 Mar 2021 23:18:29 +0200 Subject: [PATCH 41/41] Move go vet before golint --- .github/workflows/tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1579b4..b181f53 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Download modules + - name: Download go modules run: go mod download - name: Cache go modules @@ -40,14 +40,14 @@ jobs: if: runner.os != 'Windows' run: '[ -z $(gofmt -s -l .) ] || (gofmt -s -d . && exit 1)' + - name: Run go vet + run: go vet ./... + - name: Run golint run: | go install golang.org/x/lint/golint golint `go list ./... | grep -v /vendor/` - - name: Run go vet - run: go vet ./... - - name: Run go test run: go test -v -race -covermode=atomic -coverprofile=coverage.out ./...