Files
dokku/plugins/datastore/src/subcommands/subcommands.go
T
Jose Diaz-Gonzalez 68e5757590 feat: ship every datastore as a core datastore plugin
Adds a `datastore` core plugin that serves every official datastore under one command, with the datastore type as the first argument, as in `dokku datastore:create postgres lollipop`. It is built on the dokku-datastore sdk, and leaves a datastore to its official plugin while that plugin is enabled.
2026-10-29 20:32:20 -04:00

22 lines
329 B
Go

package main
import (
"os"
"strings"
"github.com/dokku/dokku-datastore/sdk"
)
// main entrypoint to all subcommands
func main() {
parts := strings.Split(os.Args[0], "/")
subcommand := parts[len(parts)-1]
args := []string{}
if len(os.Args) > 2 {
args = os.Args[2:]
}
os.Exit(sdk.RunSubcommand(subcommand, args))
}