Skip to content

Commit

Permalink
Merge pull request #151 from dnephin/move-run
Browse files Browse the repository at this point in the history
Move the main Run functions into the cmd package
  • Loading branch information
dnephin committed Oct 10, 2020
2 parents 55c3dab + 60f382a commit e3cd29c
Show file tree
Hide file tree
Showing 32 changed files with 819 additions and 810 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ builds:
- amd64
- arm64
env: [CGO_ENABLED=0]
ldflags: ["-s -w -X gotest.tools/gotestsum/cmd.version={{.Version}}"]

checksum:
name_template: '{{ .ProjectName }}-{{ .Version }}-checksums.txt'
2 changes: 1 addition & 1 deletion flags.go → cmd/flags.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package cmd

import (
"encoding/csv"
Expand Down
2 changes: 1 addition & 1 deletion flags_test.go → cmd/flags_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package cmd

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion handler.go → cmd/handler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package cmd

import (
"fmt"
Expand Down
6 changes: 3 additions & 3 deletions handler_test.go → cmd/handler_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package cmd

import (
"bytes"
Expand Down Expand Up @@ -35,7 +35,7 @@ func TestPostRunHook(t *testing.T) {

func newExecFromTestData(t *testing.T) *testjson.Execution {
t.Helper()
f, err := os.Open("testjson/testdata/go-test-json.out")
f, err := os.Open("../testjson/testdata/go-test-json.out")
assert.NilError(t, err)
defer f.Close() // nolint: errcheck

Expand All @@ -58,7 +58,7 @@ func TestEventHandler_Event_WithMissingActionFail(t *testing.T) {
errBuf := new(bytes.Buffer)
format := testjson.NewEventFormatter(errBuf, "testname")

source := golden.Get(t, "../testjson/testdata/go-test-json-missing-test-fail.out")
source := golden.Get(t, "../../testjson/testdata/go-test-json-missing-test-fail.out")
cfg := testjson.ScanConfig{
Stdout: bytes.NewReader(source),
Handler: &eventHandler{jsonFile: buf, formatter: format},
Expand Down
File renamed without changes.

0 comments on commit e3cd29c

Please sign in to comment.