Skip to content
This repository has been archived by the owner on Mar 9, 2021. It is now read-only.

Commit

Permalink
Fix goreportcard (#5)
Browse files Browse the repository at this point in the history
* gofmt

* golint

* adjust action

* fixup

* rename
  • Loading branch information
grahamplata authored Jan 17, 2020
1 parent 17c14c5 commit 3a0d801
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/push.yml → .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
on: push
name: build
name: Go Actions
jobs:
go-test:
name: Go Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: go1.12 test
- name: setup
uses: actions/checkout@master
- name: tests
uses: shoukoo/golang-pipeline/go1.12/test@master
4 changes: 2 additions & 2 deletions cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func handleRecordResponse(response *http.Response) string {
responseData, _ := ioutil.ReadAll(response.Body)
var responseObject schema.Response
json.Unmarshal(responseData, &responseObject)
var gameCount int = 0
var winRecord int = 0
var gameCount int
var winRecord int
for i := 0; i < len(responseObject.Data); i++ {
if responseObject.Data[i].VisitorTeamScore != 0 || responseObject.Data[i].HomeTeamScore != 0 {
var visitorScore int = responseObject.Data[i].VisitorTeamScore
Expand Down
4 changes: 2 additions & 2 deletions cmd/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestBuildURL(t *testing.T) {
func TestHandleNextResponse(t *testing.T) {
dummy := schema.Response{
Data: []schema.Game{
schema.Game{
{
ID: 1,
Date: "2018-10-16T00:00:00.000Z",
HomeTeamScore: 123,
Expand Down Expand Up @@ -88,7 +88,7 @@ func TestHandleNextResponse(t *testing.T) {
func TestHandleRecordResponse(t *testing.T) {
dummy := schema.Response{
Data: []schema.Game{
schema.Game{
{
ID: 1,
Date: "2018-10-16T00:00:00.000Z",
HomeTeamScore: 122,
Expand Down
1 change: 1 addition & 0 deletions cmd/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package cmd

/*
Copyright © 2019 Graham Plata <graham.plata@gmail.com>
Expand Down

0 comments on commit 3a0d801

Please sign in to comment.