Skip to content

Commit

Permalink
fixed nil map (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates authored Aug 6, 2018
1 parent 54d7726 commit 7143721
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
26 changes: 4 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,20 @@ module github.com/gobuffalo/fizz
require (
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/fatih/structs v1.0.0 // indirect
github.com/go-sql-driver/mysql v1.4.0 // indirect
github.com/gobuffalo/envy v1.6.3 // indirect
github.com/gobuffalo/makr v1.1.0 // indirect
github.com/gobuffalo/packr v1.12.1 // indirect
github.com/gobuffalo/plush v3.7.4+incompatible
github.com/gobuffalo/pop v4.5.9+incompatible // indirect
github.com/gobuffalo/tags v2.0.6+incompatible // indirect
github.com/gobuffalo/uuid v2.0.0+incompatible // indirect
github.com/gobuffalo/validate v2.0.0+incompatible // indirect
github.com/gobuffalo/plush v0.0.0-20180806154719-8d37e0b25872
github.com/gobuffalo/pop v4.5.9+incompatible
github.com/jmoiron/sqlx v0.0.0-20180614180643-0dae4fefe7c0
github.com/joho/godotenv v1.2.0 // indirect
github.com/lib/pq v0.0.0-20180523175426-90697d60dd84 // indirect
github.com/markbates/going v1.0.0 // indirect
github.com/markbates/inflect v1.0.0 // indirect
github.com/mattn/anko v0.0.6 // indirect
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.3 // indirect
github.com/mattn/go-sqlite3 v1.9.0 // indirect
github.com/microcosm-cc/bluemonday v1.0.0 // indirect
github.com/pkg/errors v0.8.0
github.com/russross/blackfriday v1.5.1
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/russross/blackfriday v2.0.0+incompatible // indirect
github.com/shurcooL/github_flavored_markdown v0.0.0-20180602233135-8913699a52e3 // indirect
github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b // indirect
github.com/shurcooL/highlight_go v0.0.0-20170515013102-78fb10f4a5f8 // indirect
github.com/shurcooL/octicon v0.0.0-20180602230221-c42b0e3b24d9 // indirect
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 // indirect
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a // indirect
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f // indirect
github.com/stretchr/testify v1.2.2
gopkg.in/yaml.v2 v2.2.1 // indirect
)
16 changes: 14 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7 h1:XFqp7VFIbbJO1hlpGbzo45NVYWVIM2eMD9MAxrOTVzU=
github.com/cockroachdb/cockroach-go v0.0.0-20180212155653-59c0560478b7/go.mod h1:XGLbWH/ujMcbPbhZq52Nv6UrCghb1yGn//133kEsvDk=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU=
Expand All @@ -8,10 +10,14 @@ github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/gobuffalo/envy v1.6.3 h1:I9iyNACF0Tovfta7iqLrUAXFHYBDBWveQrjpEv2XeWs=
github.com/gobuffalo/envy v1.6.3/go.mod h1:gOxUQY+OEwqH1a2m25Sqax1GIhj31tPNOIdFzj8QThs=
github.com/gobuffalo/github_flavored_markdown v1.0.0 h1:e2dK+SoHgOc/vfXuYMdXwEg2vAUlFzp8SBRwTOXckQ0=
github.com/gobuffalo/github_flavored_markdown v1.0.0/go.mod h1:c8/8gRnd6MSyyk+fp6E8O8cUTHd7P2cnDnH4G7o91l0=
github.com/gobuffalo/makr v1.1.0 h1:W+yof+V6V9hewYczGVAZ/bYSkD8zbBg4NtIsYu/6edc=
github.com/gobuffalo/makr v1.1.0/go.mod h1:FV+DDOUmp4NuWyuM4RrUfpodZyw63wu4DsgDfNH2a2Q=
github.com/gobuffalo/packr v1.12.1 h1:+5u3rqgdhswdYXhrX6DHaO7BM4P8oxrbvgZm9H1cRI4=
github.com/gobuffalo/packr v1.12.1/go.mod h1:H2dZhQFqHeZwr/5A/uGQkBp7xYuMGuzXFeKhYdcz5No=
github.com/gobuffalo/plush v0.0.0-20180806154719-8d37e0b25872 h1:Wbbw2FPAzXub96kYDimv7wp1Zl9Bnpdamrhgsj2E0cE=
github.com/gobuffalo/plush v0.0.0-20180806154719-8d37e0b25872/go.mod h1:MP8Yzgksl0nAiVQ/jKY6ShYnMO8gUYvBX2SwVuSCrpY=
github.com/gobuffalo/plush v3.7.4+incompatible h1:RdfWzRvIpklJerqYk6l3T8bWzyWp/wmXWIumlqL0dHs=
github.com/gobuffalo/plush v3.7.4+incompatible/go.mod h1:rQ4zdtUUyZNqULlc6bqd5scsPfLKfT0+TGMChgduDvI=
github.com/gobuffalo/pop v4.5.9+incompatible h1:IdDtXrVjNk7t6Lku7hSlWK/foorr8NgGkkIuCQauzMs=
Expand Down Expand Up @@ -44,8 +50,8 @@ github.com/microcosm-cc/bluemonday v1.0.0 h1:dr58SIfmOwOVr+m4Ye1xLWv8Dk9OFwXAtYn
github.com/microcosm-cc/bluemonday v1.0.0/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/russross/blackfriday v1.5.1 h1:B8ZN6pD4PVofmlDCDUdELeYrbsVIDM/bpjW3v3zgcRc=
github.com/russross/blackfriday v1.5.1/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk=
github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/serenize/snaker v0.0.0-20171204205717-a683aaf2d516 h1:ofR1ZdrNSkiWcMsRrubK9tb2/SlZVWttAfqUjJi6QYc=
Expand All @@ -66,10 +72,16 @@ github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8=
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a h1:8fCF9zjAir2SP3N+axz9xs+0r4V8dqPzqsWO10t8zoo=
golang.org/x/net v0.0.0-20180801234040-f4c29de78a2a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/russross/blackfriday.v1 v1.5.1 h1:/G8rrKhg8HTP6/VLtuQLbNSXHUzpDdNqZS5umeauNvc=
gopkg.in/russross/blackfriday.v1 v1.5.1/go.mod h1:NAEMj3mL3YDCD1Mxuzav3y8y68EZs2OnJ9xdWYLES00=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
3 changes: 3 additions & 0 deletions tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ func (t *Table) HasColumns(args ...string) bool {
}

func (f fizzer) CreateTable(name string, opts map[string]interface{}, help plush.HelperContext) error {
if opts == nil {
opts = map[string]interface{}{}
}
t := Table{
Name: name,
Columns: []Column{},
Expand Down

0 comments on commit 7143721

Please sign in to comment.