moby/libnetwork/cmd/networkdb-test/testMain.go
Sebastiaan van Stijn 5e2a1195d7
swap logrus types for their containerd/logs aliases
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-08-01 13:02:55 +02:00

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:])
}
}