Skip to content

Commit

Permalink
Switch to dep for dependency management (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdk authored Sep 11, 2018
1 parent 03c57a2 commit 8950282
Show file tree
Hide file tree
Showing 13 changed files with 630 additions and 108 deletions.
15 changes: 15 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[constraint]]
name = "github.com/dave/jennifer"
version = "1.0.2"

[prune]
go-tests = true
unused-packages = true
2 changes: 1 addition & 1 deletion spdx/index-zimbra-1.3.gen.go

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion spdxgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,16 @@ func render(pkg string, license spdx.License) string {
// https://github.com/golang/go/issues/13560#issuecomment-277804473
f.HeaderComment("Code generated by github.com/joshdk/licensor/spdxgen. DO NOT EDIT.")

lits := make([]jen.Code, len(license.URIs))
for index, uri := range license.URIs {
lits[index] = jen.Lit(uri)
}

value := jen.Dict{
jen.Id("Name"): jen.Lit(license.Name),
jen.Id("Identifier"): jen.Lit(license.Identifier),
jen.Id("Text"): jen.Lit(license.Text),
jen.Id("URIs"): jen.Lit(license.URIs),
jen.Id("URIs"): jen.Index().String().Values(lits...),
jen.Id("StandardTemplate"): jen.Lit(license.StandardTemplate),
jen.Id("StandardHeader"): jen.Lit(license.StandardHeader),
jen.Id("Deprecated"): jen.Lit(license.Deprecated),
Expand Down
61 changes: 61 additions & 0 deletions vendor/github.com/dave/jennifer/jen/custom.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

123 changes: 100 additions & 23 deletions vendor/github.com/dave/jennifer/jen/file.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8950282

Please sign in to comment.