Canonical path is actually otremblay.com/jkl

Also we use go dep instead of godeps
This commit is contained in:
Olivier Tremblay 2017-10-05 19:18:06 -04:00
parent edc5120921
commit 1458b63287
No known key found for this signature in database
GPG key ID: D1C73ACB855E3A6D
8 changed files with 110 additions and 42 deletions

View file

@ -1,34 +1,11 @@
package jkl
import (
"encoding/json"
"fmt"
"os"
"testing"
"text/template"
)
func TestUnmarshalProjects(t *testing.T) {
f, err := os.Open("projects.json")
if err != nil {
t.Error(err)
}
dec := json.NewDecoder(f)
x := struct{ Projects []Project }{}
err = dec.Decode(&x)
if err != nil {
t.Error(err)
}
for _, p := range x.Projects {
for _, it := range p.IssueTypes {
for sn, f := range it.Fields {
fmt.Println(it.Name, sn, f.Name, f.Required, f.Schema.Type)
}
}
}
}
type TestType struct {
Field string
}