5e2a1195d7
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
25 lines
572 B
Go
25 lines
572 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"github.com/containerd/containerd/log"
|
|
"github.com/docker/docker/libnetwork/cmd/networkdb-test/dbclient"
|
|
"github.com/docker/docker/libnetwork/cmd/networkdb-test/dbserver"
|
|
)
|
|
|
|
func main() {
|
|
_ = log.SetFormat(log.TextFormat)
|
|
log.G(context.TODO()).Infof("Starting the image with these args: %v", os.Args)
|
|
if len(os.Args) < 1 {
|
|
log.G(context.TODO()).Fatal("You need at least 1 argument [client/server]")
|
|
}
|
|
|
|
switch os.Args[1] {
|
|
case "server":
|
|
dbserver.Server(os.Args[2:])
|
|
case "client":
|
|
dbclient.Client(os.Args[2:])
|
|
}
|
|
}
|