Skip to content

Commit

Permalink
fix: Remove timestamp from generated files
Browse files Browse the repository at this point in the history
We don't need to know when the file was generated so it makes no sense
to keep the timestamp.
  • Loading branch information
gkats committed Feb 14, 2024
1 parent fbe0bac commit c78b3db
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cmd/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"regexp"
"strings"
"text/template"
"time"
"unicode"
)

Expand All @@ -43,7 +42,6 @@ func main() {
// Start writing with the header.
err = headTempl.Execute(&b, headVars{
Command: "gen",
Timestamp: time.Now().UTC(),
PackageName: path.Base(cwd),
})
if err != nil {
Expand Down Expand Up @@ -169,14 +167,12 @@ func getFuncVars(line string) funcVars {

type headVars struct {
Command string
Timestamp time.Time
PackageName string
}

var headTempl = template.Must(template.New("").Parse(`
// Code generated by "{{.Command}}"; DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
// Last generated at {{.Timestamp}}
package {{.PackageName}}
import (
Expand Down

0 comments on commit c78b3db

Please sign in to comment.