Skip to content

Commit f48934b

Browse files
author
mayank
committed
Fixing indentation
Signed-off-by: mayank <mayank.patel@mayadata.io>
1 parent 4976053 commit f48934b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ func copyStructFile(fs *ast.File, w *bufio.Writer) {
217217
if b.Tok != token.TYPE {
218218
break
219219
}
220-
_, err := fmt.Fprintf(w, "type %s struct {\n", b.Specs[0].(*ast.TypeSpec).Name.Name)
220+
_, err := fmt.Fprintf(w, "\ntype %s struct {\n", b.Specs[0].(*ast.TypeSpec).Name.Name)
221221
if err != nil {
222222
log.Fatalf("Failed to write struct : %v", err)
223223
}

template.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var BuildVarTemplate = `
44
// With$Var method fills the $Var field of $NewObj object.
55
func ($obj *$newobj) With$Var($var $iType) *$NewObj {
66
$obj.$var = $var
7-
return $obj
7+
return $obj
88
}
99
`
1010
var BuildTemplate = `
@@ -31,11 +31,10 @@ var PredicateVarTemplate = `
3131
func Is$VarSet() PredicateFunc {
3232
return func(c *$newobj) bool {
3333
return $cond
34-
}
34+
}
3535
}
3636
`
3737
var PredicateTemplate = `
3838
// PredicateFunc defines data-type for validation function
3939
type PredicateFunc func(*$newobj) bool
40-
4140
`

0 commit comments

Comments
 (0)