Normalized function naming

This commit is contained in:
Torben Nehmer 2021-08-22 14:50:52 +02:00
parent 7b93ff425d
commit 5242cc98f7
4 changed files with 4 additions and 4 deletions

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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")
}

View File

@ -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()