Skip to main content

Initiation of App via Main.go Function

Source code reference location

The main.go file and associated main function fires the method call of NewRootCmd. This method - as detailed in the subsequent section is located in node/cmd/akash/cmd/root.go

func main() {
rootCmd, _ := cmd.NewRootCmd()

if err := cmd.Execute(rootCmd, "AKASH"); err != nil {
switch e := err.(type) {
case server.ErrorCode:
os.Exit(e.Code)
default:
os.Exit(1)
}
}
}