v.io/jiri@v0.0.0-20160715023856-abfb8b131290/profiles/profilescmdline/internal/i2/i2.go (about)

     1  // Copyright 2015 The Vanadium Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // The following enables go generate to generate the doc.go file.
     6  //go:generate go run $JIRI_ROOT/release/go/src/v.io/x/lib/cmdline/testdata/gendoc.go -env=CMDLINE_PREFIX=jiri .
     7  
     8  package main
     9  
    10  import (
    11  	"v.io/jiri"
    12  	"v.io/jiri/profiles/profilescmdline"
    13  	"v.io/jiri/profiles/profilesmanager"
    14  
    15  	"v.io/jiri/tool"
    16  	"v.io/x/lib/cmdline"
    17  
    18  	// Add profile manager implementations here.
    19  	"v.io/jiri/profiles/profilescmdline/internal/example"
    20  )
    21  
    22  // commandLineDriver implements the command line for the 'profile-v23'
    23  // subcommand.
    24  var commandLineDriver = &cmdline.Command{
    25  	Name:  "profile-i2",
    26  	Short: "Manage i2 profiles",
    27  	Long:  profilescmdline.HelpMsg(),
    28  }
    29  
    30  func main() {
    31  	profilesmanager.Register(example.New("i2", "eg"))
    32  	profilescmdline.RegisterManagementCommands(commandLineDriver, true, "i2", jiri.ProfilesDBDir, jiri.ProfilesRootDir)
    33  	tool.InitializeRunFlags(&commandLineDriver.Flags)
    34  	cmdline.Main(commandLineDriver)
    35  }