mirror of
https://github.com/h44z/wg-portal
synced 2025-02-26 05:49:14 +00:00
chore: no need to use fmt.Sprintf (#190)
This commit is contained in:
parent
b49ff66c41
commit
6284bc8a01
@ -92,7 +92,7 @@ func (i *Interface) CopyCalculatedAttributes(src *Interface) {
|
|||||||
func (i *Interface) GetConfigFileName() string {
|
func (i *Interface) GetConfigFileName() string {
|
||||||
reg := regexp.MustCompile("[^a-zA-Z0-9-_]+")
|
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 = reg.ReplaceAllString(filename, "")
|
||||||
filename += ".conf"
|
filename += ".conf"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user