1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-23 23:54:17 +03:00
croc/main.go
Niko Köser 0b60fef246
refactor: write errors into stderr and add exit code
Instead of writing errors into stdout and alway returning exit code 0,
we now write into stderr and return exit code 1 in case that an error
occured.
2021-02-01 10:48:34 +01:00

34 lines
666 B
Go

package main
//go:generate go run src/install/updateversion.go
//go:generate git commit -am "bump $VERSION"
//go:generate git tag -af v$VERSION -m "v$VERSION"
import (
"log"
"github.com/schollz/croc/v8/src/cli"
)
func main() {
// "github.com/pkg/profile"
// go func() {
// for {
// f, err := os.Create("croc.pprof")
// if err != nil {
// panic(err)
// }
// runtime.GC() // get up-to-date statistics
// if err := pprof.WriteHeapProfile(f); err != nil {
// panic(err)
// }
// f.Close()
// time.Sleep(3 * time.Second)
// fmt.Println("wrote profile")
// }
// }()
if err := cli.Run(); err != nil {
log.Fatalln(err)
}
}