Skip to content

Commit

Permalink
remove the example folder. its not helpful at all.
Browse files Browse the repository at this point in the history
Coverage :))))))
  • Loading branch information
fzerorubigd committed May 7, 2017
1 parent 8796ae4 commit 5bd2831
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 56 deletions.
47 changes: 0 additions & 47 deletions example/main.go

This file was deleted.

7 changes: 0 additions & 7 deletions example/test.json

This file was deleted.

12 changes: 10 additions & 2 deletions onion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,19 @@ type nested struct {
F64 float64
}

type anonIgnored struct {
Six string
}

type structExample struct {
Key0 int
Universe string `onion:"key1"`
Key2 string
Key3 bool

anonNested
nested `onion:"nested"`
nested `onion:"nested"`
anonIgnored `onion:"-"`

Another nested `onion:"nested"`

Expand All @@ -47,13 +52,15 @@ type structExample struct {
type EmbededTest struct {
Operator string `onion:"operator"`
Aggregator string `onion:"aggregator"`
Ignored string `onion:"-"`
}

type Worker struct {
Inner struct {
Tmp2 int `onion:"tmp2"`
EmbededTest
Tmp int `onion:"tmp"`
Tmp int `onion:"tmp"`
Ignored string `onion:"-"`
} `onion:"inner"`
}

Expand Down Expand Up @@ -306,6 +313,7 @@ func TestOnion(t *testing.T) {
So(cfg.Inner.Aggregator, ShouldEqual, "agg")
So(cfg.Inner.Tmp2, ShouldEqual, 101)
So(cfg.Inner.Tmp, ShouldEqual, 99)
So(cfg.Inner.Ignored, ShouldEqual, "")
})

Convey("test for register variables", t, func() {
Expand Down

0 comments on commit 5bd2831

Please sign in to comment.