123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- package main
- import (
- "os"
- "os/user"
- "runtime"
- "github.com/codegangsta/cli"
- "github.com/gogits/gogs/modules/base"
- )
- const go11tag = true
- const APP_VER = "0.0.8.0315"
- func init() {
- base.AppVer = APP_VER
- runtime.GOMAXPROCS(runtime.NumCPU())
- }
- func checkRunUser() bool {
- u, err := user.Current()
- if err != nil {
-
- return false
- }
- return u.Username == base.Cfg.MustValue("", "RUN_USER")
- }
- func main() {
-
- app := cli.NewApp()
- app.Name = "Gogs"
- app.Usage = "Go Git Service"
- app.Version = APP_VER
- app.Commands = []cli.Command{
- CmdWeb,
- CmdServ,
- }
- app.Flags = append(app.Flags, []cli.Flag{
- cli.BoolFlag{"noterm", "disable color output"},
- }...)
- app.Run(os.Args)
- }
|