Refactor table commands to use nftCommand utilities for improved code reuse
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package nft
|
||||
|
||||
import "git.kor-elf.net/kor-elf-shield/go-nftables-client/family"
|
||||
|
||||
func TableAdd(family family.Type, tableName string) []string {
|
||||
return []string{"add", "table", family.String(), tableName}
|
||||
}
|
||||
|
||||
func TableDelete(family family.Type, tableName string) []string {
|
||||
return []string{"delete", "table", family.String(), tableName}
|
||||
}
|
||||
|
||||
func TableClear(family family.Type, tableName string) []string {
|
||||
return []string{"flush", "table", family.String(), tableName}
|
||||
}
|
||||
Reference in New Issue
Block a user