Skip to content

Instantly share code, notes, and snippets.

@poolpOrg
Created May 1, 2024 10:31
Show Gist options
  • Save poolpOrg/1f73fd2fd78d4669e73f493a11f211a9 to your computer and use it in GitHub Desktop.
Save poolpOrg/1f73fd2fd78d4669e73f493a11f211a9 to your computer and use it in GitHub Desktop.
table API in Golang
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