github.com/koko1123/flow-go-1@v0.29.6/cmd/access/main.go (about)

     1  package main
     2  
     3  import (
     4  	"github.com/koko1123/flow-go-1/cmd"
     5  	nodebuilder "github.com/koko1123/flow-go-1/cmd/access/node_builder"
     6  	"github.com/koko1123/flow-go-1/model/flow"
     7  )
     8  
     9  func main() {
    10  	builder := nodebuilder.FlowAccessNode(cmd.FlowNode(flow.RoleAccess.String()))
    11  
    12  	builder.PrintBuildVersionDetails()
    13  
    14  	// parse all the command line args
    15  	if err := builder.ParseFlags(); err != nil {
    16  		builder.Logger.Fatal().Err(err).Send()
    17  	}
    18  
    19  	if err := builder.Initialize(); err != nil {
    20  		builder.Logger.Fatal().Err(err).Send()
    21  	}
    22  
    23  	node, err := builder.Build()
    24  	if err != nil {
    25  		builder.Logger.Fatal().Err(err).Send()
    26  	}
    27  	node.Run()
    28  }