func main() { if len(os.Args) > 1 && os.Args[1] == "daemon" { runDaemon() } else { skel.PluginMain(cmdAdd, cmdDel) } }
func main() { // Display the version on "-v", otherwise just delegate to the skel code. // Use a new flag set so as not to conflict with existing libraries which use "flag" flagSet := flag.NewFlagSet("calico-ipam", flag.ExitOnError) version := flagSet.Bool("v", false, "Display version") err := flagSet.Parse(os.Args[1:]) if err != nil { fmt.Println(err) os.Exit(1) } if *version { fmt.Println(VERSION) os.Exit(0) } skel.PluginMain(cmdAdd, cmdDel) }
func main() { skel.PluginMain(cmdAdd, cmdDel, version.Legacy) }
func main() { skel.PluginMain(cmdAdd, cmdDel) }
func main() { rand.Seed(time.Now().UTC().UnixNano()) p := NewCNIPlugin(cniserver.CNIServerSocketPath) skel.PluginMain(p.skelCmdAdd, p.CmdDel, version.Legacy) }
func main() { p := NewCNIPlugin(cniserver.CNIServerSocketPath) skel.PluginMain(p.skelCmdAdd, p.CmdDel, version.Legacy) }
func main() { skel.PluginMain(cmdAdd, cmdDel, version.PluginSupports("0.1.0", "0.2.0")) }