From ac18cc470dcf5af38029ac1f3638b1ae3ae79f53 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Fri, 1 Apr 2022 15:23:45 +0800 Subject: [PATCH] chore: refactor to use const instead of var (#1731) --- tools/goctl/util/head.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/goctl/util/head.go b/tools/goctl/util/head.go index 1f3be01f..117767cf 100644 --- a/tools/goctl/util/head.go +++ b/tools/goctl/util/head.go @@ -1,10 +1,12 @@ package util -// DoNotEditHead added to the beginning of a file to prompt the user not to edit -var DoNotEditHead = "// Code generated by goctl. DO NOT EDIT!" +const ( + // DoNotEditHead added to the beginning of a file to prompt the user not to edit + DoNotEditHead = "// Code generated by goctl. DO NOT EDIT!" -var headTemplate = `// Code generated by goctl. DO NOT EDIT! + headTemplate = DoNotEditHead + ` // Source: {{.source}}` +) // GetHead returns a code head string with source filename func GetHead(source string) string {