Fixed code section.

This commit is contained in:
Foil-hat-guy 2025-04-20 02:49:35 +03:00
parent 7382dde1f6
commit 593e665606
No known key found for this signature in database
GPG key ID: 221CC305A7B23591

View file

@ -9,7 +9,7 @@ import (
const warning = "//WARNING! DO NOT EDIT THIS FILE BY HAND. IT IS AUTO GENERATED.\n"
const header = "package main\nconst gitVersion = \""
const header = "package main\n"
const code = `
import (
@ -25,7 +25,7 @@ func init() {
}
}
}
`
const gitVersion = "`
func main() {
cmd := exec.Command("git", "describe", "--tags", "--abbrev=0")
@ -36,7 +36,7 @@ func main() {
}
version := string(out)
version = version[:len(version)-1]
content := warning + header + version + "\"" + code
content := warning + header + code + version + "\""
ioutil.WriteFile("version.go", []byte(content), 0644)
}