Skip to content

Commit

Permalink
Codecgen full package
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Apr 26, 2018
1 parent e5dbabf commit 9ce1f62
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions client/structs/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

FILES="$(ls *.go | tr '\n' ' ')"
codecgen -d 102 -o structs.generated.go ${FILES}
2 changes: 1 addition & 1 deletion client/structs/structs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package structs

//go:generate codecgen -d 102 -o structs.generated.go structs.go
//go:generate ./generate.sh

import (
"crypto/md5"
Expand Down
5 changes: 5 additions & 0 deletions nomad/structs/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

FILES="$(ls *[!_test].go | tr '\n' ' ')"
codecgen -d 100 -o structs.generated.go ${FILES}
2 changes: 1 addition & 1 deletion nomad/structs/structs_codegen.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package structs

//go:generate codecgen -d 100 -o structs.generated.go structs.go
//go:generate ./generate.sh

0 comments on commit 9ce1f62

Please sign in to comment.