aboutsummaryrefslogtreecommitdiffstats
path: root/_examples
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-02-01 09:12:52 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-02-01 09:15:18 +0100
commit26095380851db820e95f46983109b4b846dadbba (patch)
treecbc70dca0585b3a5a696ba77f1209d1e552cdbc9 /_examples
parenta6197bd8c459c7d10717bd9486c17f6c8b3f7f88 (diff)
downloadgo-git-26095380851db820e95f46983109b4b846dadbba.tar.gz
fix example folder
Diffstat (limited to '_examples')
-rw-r--r--_examples/clone/main.go2
-rw-r--r--_examples/common.go9
-rw-r--r--_examples/common_test.go2
-rw-r--r--_examples/custom_http/main.go2
-rw-r--r--_examples/log/main.go2
-rw-r--r--_examples/open/main.go2
-rw-r--r--_examples/progress/main.go2
-rw-r--r--_examples/push/main.go2
-rw-r--r--_examples/remotes/main.go2
-rw-r--r--_examples/showcase/main.go2
10 files changed, 13 insertions, 14 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() {