diff options
-rw-r--r-- | _examples/clone/main.go | 2 | ||||
-rw-r--r-- | _examples/common.go | 9 | ||||
-rw-r--r-- | _examples/common_test.go | 2 | ||||
-rw-r--r-- | _examples/custom_http/main.go | 2 | ||||
-rw-r--r-- | _examples/log/main.go | 2 | ||||
-rw-r--r-- | _examples/open/main.go | 2 | ||||
-rw-r--r-- | _examples/progress/main.go | 2 | ||||
-rw-r--r-- | _examples/push/main.go | 2 | ||||
-rw-r--r-- | _examples/remotes/main.go | 2 | ||||
-rw-r--r-- | _examples/showcase/main.go | 2 | ||||
-rw-r--r-- | example_test.go | 5 |
11 files changed, 16 insertions, 16 deletions
diff --git a/_examples/clone/main.go b/_examples/clone/main.go index 7d48c40..7d173a6 100644 --- a/_examples/clone/main.go +++ b/_examples/clone/main.go @@ -5,7 +5,7 @@ import ( "os" "srcd.works/go-git.v4" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" ) func main() { diff --git a/_examples/common.go b/_examples/common.go index 971b0f6..913cb18 100644 --- a/_examples/common.go +++ b/_examples/common.go @@ -1,10 +1,9 @@ package examples import ( + "fmt" "os" "strings" - - "github.com/fatih/color" ) func CheckArgs(arg ...string) { @@ -19,14 +18,14 @@ func CheckIfError(err error) { return } - color.Red("error: %s", err) + fmt.Printf("\x1b[31;1m%s\x1b[0m\n", fmt.Sprintf("error: %s", err)) os.Exit(1) } func Info(format string, args ...interface{}) { - color.Blue(format, args...) + fmt.Printf("\x1b[34;1m%s\x1b[0m\n", fmt.Sprintf(format, args...)) } func Warning(format string, args ...interface{}) { - color.Cyan(format, args...) + fmt.Printf("\x1b[36;1m%s\x1b[0m\n", fmt.Sprintf(format, args...)) } diff --git a/_examples/common_test.go b/_examples/common_test.go index b218e07..f65c1dc 100644 --- a/_examples/common_test.go +++ b/_examples/common_test.go @@ -73,7 +73,7 @@ func packageFolder() string { func examplesFolder() string { return filepath.Join( packageFolder(), - "examples", "*", "main.go", + "_examples", "*", "main.go", ) } diff --git a/_examples/custom_http/main.go b/_examples/custom_http/main.go index ee8b96b..f584da2 100644 --- a/_examples/custom_http/main.go +++ b/_examples/custom_http/main.go @@ -8,7 +8,7 @@ import ( "time" "srcd.works/go-git.v4" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" "srcd.works/go-git.v4/plumbing/transport/client" githttp "srcd.works/go-git.v4/plumbing/transport/http" "srcd.works/go-git.v4/storage/memory" diff --git a/_examples/log/main.go b/_examples/log/main.go index 486e8c9..eded360 100644 --- a/_examples/log/main.go +++ b/_examples/log/main.go @@ -4,7 +4,7 @@ import ( "fmt" "srcd.works/go-git.v4" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" "srcd.works/go-git.v4/storage/memory" ) diff --git a/_examples/open/main.go b/_examples/open/main.go index aa51935..063c277 100644 --- a/_examples/open/main.go +++ b/_examples/open/main.go @@ -5,7 +5,7 @@ import ( "os" "srcd.works/go-git.v4" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" ) func main() { diff --git a/_examples/progress/main.go b/_examples/progress/main.go index a06de54..81546c3 100644 --- a/_examples/progress/main.go +++ b/_examples/progress/main.go @@ -4,7 +4,7 @@ import ( "os" "srcd.works/go-git.v4" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" ) func main() { diff --git a/_examples/push/main.go b/_examples/push/main.go index cfae064..aaec5a3 100644 --- a/_examples/push/main.go +++ b/_examples/push/main.go @@ -4,7 +4,7 @@ import ( "os" "srcd.works/go-git.v4" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" ) func main() { diff --git a/_examples/remotes/main.go b/_examples/remotes/main.go index 362244b..9537fea 100644 --- a/_examples/remotes/main.go +++ b/_examples/remotes/main.go @@ -4,8 +4,8 @@ import ( "fmt" "srcd.works/go-git.v4" + . "srcd.works/go-git.v4/_examples" "srcd.works/go-git.v4/config" - . "srcd.works/go-git.v4/examples" "srcd.works/go-git.v4/plumbing" "srcd.works/go-git.v4/storage/memory" ) diff --git a/_examples/showcase/main.go b/_examples/showcase/main.go index e70de61..7772d84 100644 --- a/_examples/showcase/main.go +++ b/_examples/showcase/main.go @@ -8,7 +8,7 @@ import ( "srcd.works/go-git.v4" "srcd.works/go-git.v4/plumbing/object" - . "srcd.works/go-git.v4/examples" + . "srcd.works/go-git.v4/_examples" ) func main() { diff --git a/example_test.go b/example_test.go index a45225a..2478a02 100644 --- a/example_test.go +++ b/example_test.go @@ -8,11 +8,12 @@ import ( "os" "path/filepath" - "srcd.works/go-billy.v1/memfs" - git "srcd.works/go-git.v4" + "srcd.works/go-git.v4" "srcd.works/go-git.v4/config" "srcd.works/go-git.v4/plumbing" "srcd.works/go-git.v4/storage/memory" + + "srcd.works/go-billy.v1/memfs" ) func ExampleClone() { |