Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: snychka/golang-cli-playbook
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: asilverman/golang-cli-playbook
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Apr 28, 2020

  1. remove test for old task1

    xiao committed Apr 28, 2020
    Copy the full SHA
    d2b798d View commit details
  2. update error message

    xiao committed Apr 28, 2020
    Copy the full SHA
    c5da0c4 View commit details
  3. Copy the full SHA
    19ff607 View commit details
Showing with 6 additions and 18 deletions.
  1. +0 −9 module5/module5_test.go
  2. +1 −1 module6/module6_test.go
  3. +5 −8 module7/module7_test.go
9 changes: 0 additions & 9 deletions module5/module5_test.go
Original file line number Diff line number Diff line change
@@ -9,15 +9,6 @@ import (
"testing"
)

func TestModule5InstallationOfgoimports(t *testing.T) {
binPath := path.Join(os.Getenv("GOPATH"), "bin")
found := FindFileAtPath(binPath, "goimports")

if !found {
t.Errorf("goimports cannot be found")
}
}

func TestModule5goimportsContent(t *testing.T) {
expected := " \"fmt\""
found := OpenFileAndFindNthString("./module5_code.go", 0, expected)
2 changes: 1 addition & 1 deletion module6/module6_test.go
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ func TestModule6DocumentTest(t *testing.T) {
found := OpenFileAndFindString("module6.txt", "func FunctionForModule6GoDoc()")

if !found {
t.Errorf("go doc does not work as expected")
t.Errorf("go doc does not generate the comment properly")
}

// TODO: add more tests
13 changes: 5 additions & 8 deletions module7/module7_test.go
Original file line number Diff line number Diff line change
@@ -18,25 +18,22 @@ func TestModule7gogenerate(t *testing.T) {

func TestModule7Import(t *testing.T) {
found := OpenFileAndFindString("module7_code.go", "import (")

if !found {
t.Errorf("import not found")
return
}
}

func TestModule7ImportFmt(t *testing.T) {
found := OpenFileAndFindString("module7_code.go", " \"fmt\"")

found = OpenFileAndFindString("module7_code.go", " \"fmt\"")
if !found {
t.Errorf("package 'fmt' not imported")
return
}
}

func TestModule7ImportRuntime(t *testing.T) {
found := OpenFileAndFindString("module7_code.go", " \"runtime\"")
found = OpenFileAndFindString("module7_code.go", " \"runtime\"")

if !found {
t.Errorf("package 'runtime' not imported")
return
}
}