github.com/Xenoex/gopm@v0.6.5/gopm.go (about)

     1  // +build go1.1
     2  
     3  // Copyright 2013 gopm authors.
     4  //
     5  // Licensed under the Apache License, Version 2.0 (the "License"): you may
     6  // not use this file except in compliance with the License. You may obtain
     7  // a copy of the License at
     8  //
     9  //     http://www.apache.org/licenses/LICENSE-2.0
    10  //
    11  // Unless required by applicable law or agreed to in writing, software
    12  // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
    13  // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    14  // License for the specific language governing permissions and limitations
    15  // under the License.
    16  
    17  // gopm(Go Package Manager) is a Go package manage tool for searching, installing, updating and sharing your packages in Go.
    18  package main
    19  
    20  import (
    21  	"os"
    22  	"runtime"
    23  
    24  	"github.com/codegangsta/cli"
    25  
    26  	"github.com/gpmgo/gopm/cmd"
    27  )
    28  
    29  const APP_VER = "0.6.5.0524"
    30  
    31  //		cmd.CmdTest,
    32  //		cmd.CmdSearch,
    33  // 		cmdClean,
    34  // 		cmdDoc,
    35  // 		cmdEnv,
    36  // 		cmdFix,
    37  // 		cmdList,
    38  // 		cmdTool,
    39  // 		cmdVet,
    40  
    41  func init() {
    42  	runtime.GOMAXPROCS(runtime.NumCPU())
    43  }
    44  
    45  func main() {
    46  	app := cli.NewApp()
    47  	app.Name = "gopm"
    48  	app.Usage = "Go Package Manager"
    49  	app.Version = APP_VER
    50  	app.Commands = []cli.Command{
    51  		cmd.CmdGet,
    52  		cmd.CmdBin,
    53  		// cmd.CmdExec,
    54  		cmd.CmdGen,
    55  		cmd.CmdRun,
    56  		cmd.CmdBuild,
    57  		cmd.CmdInstall,
    58  		cmd.CmdUpdate,
    59  		cmd.CmdConfig,
    60  	}
    61  	app.Flags = append(app.Flags, []cli.Flag{
    62  		cli.BoolFlag{"noterm", "disable color output"},
    63  	}...)
    64  	app.Run(os.Args)
    65  }