@@ -2,18 +2,19 @@ package main
22
33import (
44 "fmt"
5- "github.com/stretchr/testify/assert"
6- "github.com/tanin47/git-notes/internal/test_helpers"
75 "io/ioutil"
86 "os"
97 "testing"
108 "time"
9+
10+ "github.com/stretchr/testify/assert"
11+ "github.com/tanin47/git-notes/internal/test_helpers"
1112)
1213
1314func TestMainFunc (t * testing.T ) {
1415 Running = true
1516
16- var git = NewGoGit ()
17+ git : = NewGoGit ()
1718
1819 repos := test_helpers .SetupRepos ()
1920 defer test_helpers .CleanupRepos (repos )
@@ -41,7 +42,7 @@ func TestMainFunc(t *testing.T) {
4142 state , err := git .GetState (repos .Local )
4243 assert .NoError (t , err )
4344 return state == Sync
44- }, 15 * time .Second , 1 * time .Second )
45+ }, 15 * time .Second , 1 * time .Second )
4546
4647 test_helpers .WriteFile (t , repos .Local , "test.md" , "TestContent2" )
4748
@@ -53,16 +54,16 @@ func TestMainFunc(t *testing.T) {
5354 state , err := git .GetState (repos .Local )
5455 assert .NoError (t , err )
5556 return state == Sync
56- }, 15 * time .Second , 1 * time .Second )
57+ }, 15 * time .Second , 1 * time .Second )
5758
5859 Running = false
5960}
6061
6162func TestRun (t * testing.T ) {
62- var git = MockGit {}
63- var watcher = MockWatcher {}
64- var configReader = MockConfigReader {}
65- var monitor = MockMonitor {}
63+ git : = MockGit {}
64+ watcher : = MockWatcher {}
65+ configReader : = MockConfigReader {}
66+ monitor : = MockMonitor {}
6667
6768 oldArgs := os .Args
6869 os .Args = []string {"app" , "some-git-notes.json" }
@@ -80,7 +81,7 @@ type MockConfigReader struct {
8081
8182func (m * MockConfigReader ) Read (path string ) (* Config , error ) {
8283 m .readPath = path
83- var config = & Config {
84+ config : = & Config {
8485 Repos : []string {"some-path" , "some-path-2" },
8586 }
8687 return config , nil
0 commit comments