Canonical path is actually otremblay.com/jkl
Also we use go dep instead of godeps
This commit is contained in:
parent
edc5120921
commit
1458b63287
8 changed files with 110 additions and 42 deletions
23
jkl_test.go
23
jkl_test.go
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue