From 1f5aeccf2d153ecb3fc0e5b25563fa3a4074b565 Mon Sep 17 00:00:00 2001 From: Christopher Dziomba Date: Fri, 20 Sep 2024 13:56:27 +0200 Subject: [PATCH] rename fixCfgReplacements to applyCfgReplacements --- pkg/frr/configure.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/frr/configure.go b/pkg/frr/configure.go index fa83c58..d5d8782 100644 --- a/pkg/frr/configure.go +++ b/pkg/frr/configure.go @@ -67,7 +67,7 @@ func (m *Manager) Configure(in Configuration, nm *nl.Manager, nwopCfg *config.Co } targetConfig = fixRouteTargetReload(targetConfig) - targetConfig = fixCfgReplacements(targetConfig, nwopCfg.Replacements) + targetConfig = applyCfgReplacements(targetConfig, nwopCfg.Replacements) if !bytes.Equal(currentConfig, targetConfig) { err = os.WriteFile(m.ConfigPath, targetConfig, frrPermissions) @@ -175,8 +175,8 @@ func fixRouteTargetReload(frrConfig []byte) []byte { }) } -// fixCfgReplacements replaces placeholders in the configuration with the actual values. -func fixCfgReplacements(frrConfig []byte, replacements []config.Replacement) []byte { +// applyCfgReplacements replaces placeholders in the configuration with the actual values. +func applyCfgReplacements(frrConfig []byte, replacements []config.Replacement) []byte { for _, replacement := range replacements { if !replacement.Regex { frrConfig = bytes.ReplaceAll(frrConfig, []byte(replacement.Old), []byte(replacement.New))