From 5242cc98f7e2638ec0bb40b3c789f51c8502a6d2 Mon Sep 17 00:00:00 2001 From: Torben Nehmer Date: Sun, 22 Aug 2021 14:50:52 +0200 Subject: [PATCH] Normalized function naming --- cmd/dns-update.go | 2 +- cmd/nft-update.go | 2 +- service/dns.go | 2 +- service/nftables.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/dns-update.go b/cmd/dns-update.go index 4e5d7df..83c517c 100644 --- a/cmd/dns-update.go +++ b/cmd/dns-update.go @@ -29,7 +29,7 @@ func init() { log.Printf("Configuration in use: %v", viper.AllSettings()) service.LoadConfig() - err := service.UpdateDNSEntry(*domain, *name, *ip4, *ip6) + err := service.DNSUpdateEntry(*domain, *name, *ip4, *ip6) if err != nil { log.Fatalf("Could not update DNS: %s", err) } diff --git a/cmd/nft-update.go b/cmd/nft-update.go index 5ae570a..4631769 100644 --- a/cmd/nft-update.go +++ b/cmd/nft-update.go @@ -30,7 +30,7 @@ func init() { log.Printf("Configuration in use: %v", viper.AllSettings()) service.LoadConfig() - err := service.UpdateNFTSets(*table, *set4, *ip4, *set6, *ip6) + err := service.NFTUpdateSets(*table, *set4, *ip4, *set6, *ip6) if err != nil { log.Fatalf("Could not update NFT: %s", err) } diff --git a/service/dns.go b/service/dns.go index 6efade9..73a566b 100644 --- a/service/dns.go +++ b/service/dns.go @@ -16,7 +16,7 @@ func init() { } } -func UpdateDNSEntry(domain string, hostname string, ip4 net.IP, ip6 net.IP) error { +func DNSUpdateEntry(domain string, hostname string, ip4 net.IP, ip6 net.IP) error { if ip4 == nil && ip6 == nil { return fmt.Errorf("at least one of --ipv4 and --ipv6 have to be set") } diff --git a/service/nftables.go b/service/nftables.go index afd8494..f67c824 100644 --- a/service/nftables.go +++ b/service/nftables.go @@ -8,7 +8,7 @@ import ( "github.com/google/nftables" ) -func UpdateNFTSets(tableName string, set4name string, ip4 net.IP, set6name string, ip6 net.IP) error { +func NFTUpdateSets(tableName string, set4name string, ip4 net.IP, set6name string, ip6 net.IP) error { runtime.LockOSThread() defer runtime.UnlockOSThread()