Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove timestamp from generated files #246

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading