Created
May 1, 2024 10:31
-
-
Save poolpOrg/1f73fd2fd78d4669e73f493a11f211a9 to your computer and use it in GitHub Desktop.
table API in Golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/poolpOrg/OpenSMTPD-framework/table" | |
) | |
func main() { | |
table.Init() | |
table.OnUpdate(func() { | |
}) | |
table.OnCheck(table.K_ALIAS, func(key string) (bool, error) { | |
return true, nil | |
}) | |
table.OnLookup(table.K_ALIAS, func(key string) (string, error) { | |
return "", nil | |
}) | |
table.OnFetch(table.K_ALIAS, func() (string, error) { | |
return "", nil | |
}) | |
table.Dispatch() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment