mirror of
https://github.com/moby/moby.git
synced 2026-07-19 22:12:22 +00:00
The github.com/containerd/containerd/log package was moved to a separate module, which will also be used by upcoming (patch) releases of containerd. This patch moves our own uses of the package to use the new module. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
26 lines
561 B
Go
26 lines
561 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"github.com/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:])
|
|
}
|
|
}
|