chore: no need to use fmt.Sprintf (#190)

This commit is contained in:
guangwu 2023-10-23 00:40:54 +08:00 committed by GitHub
parent b49ff66c41
commit 6284bc8a01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,7 +92,7 @@ func (i *Interface) CopyCalculatedAttributes(src *Interface) {
func (i *Interface) GetConfigFileName() string {
reg := regexp.MustCompile("[^a-zA-Z0-9-_]+")
filename := fmt.Sprintf("%s", internal.TruncateString(string(i.Identifier), 8))
filename := internal.TruncateString(string(i.Identifier), 8)
filename = reg.ReplaceAllString(filename, "")
filename += ".conf"