We have an skeleton now.
authorOllivier Robert <roberto@keltia.net>
Wed, 05 Apr 2017 15:11:22 +0200
changeset 7 0fbbac6d8e8c
parent 6 47035af1f167
child 8 6d89be3dd966
We have an skeleton now.
cmd/gondole/main.go
gondole.go
gondole_test.go
types.go
--- a/cmd/gondole/main.go	Wed Apr 05 14:49:50 2017 +0200
+++ b/cmd/gondole/main.go	Wed Apr 05 15:11:22 2017 +0200
@@ -1,5 +1,10 @@
 package main
 
+import (
+    "log"
+    "github.com/keltia/gondole"
+)
+
 func main() {
-
+    log.Printf("Gondole CLI app v%s", gondole.Version)
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gondole.go	Wed Apr 05 15:11:22 2017 +0200
@@ -0,0 +1,13 @@
+package gondole
+
+import (
+
+)
+
+const (
+    Version = "0.0"
+)
+
+func NewApp(name, redirectURI string) (g *Gondole, err error) {
+    return
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gondole_test.go	Wed Apr 05 15:11:22 2017 +0200
@@ -0,0 +1,13 @@
+package gondole
+
+import (
+    "reflect"
+    "testing"
+    "github.com/stretchr/testify/assert"
+)
+
+func TestNewApp(t *testing.T) {
+    g, err := NewApp("foo", "bar")
+    assert.NoError(t, err, "no error")
+    assert.Equal(t, reflect.TypeOf(&Gondole{}), reflect.TypeOf(g), "should be Gondole")
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/types.go	Wed Apr 05 15:11:22 2017 +0200
@@ -0,0 +1,5 @@
+package gondole
+
+type Gondole struct {
+
+}