k3s/cmd/agent/main.go

25 lines
467 B
Go
Raw Normal View History

2019-01-09 16:54:15 +00:00
package main
import (
"context"
"errors"
2019-01-09 16:54:15 +00:00
"os"
"github.com/rancher/k3s/pkg/cli/agent"
"github.com/rancher/k3s/pkg/cli/cmds"
"github.com/rancher/k3s/pkg/configfilearg"
2019-01-09 16:54:15 +00:00
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
2019-01-09 16:54:15 +00:00
)
func main() {
app := cmds.NewApp()
app.Commands = []cli.Command{
2019-01-09 16:54:15 +00:00
cmds.NewAgentCommand(agent.Run),
}
if err := app.Run(configfilearg.MustParse(os.Args)); err != nil && !errors.Is(err, context.Canceled) {
2019-01-09 16:54:15 +00:00
logrus.Fatal(err)
}
}