github.com/orteth01/up@v0.2.0/internal/cli/app/app.go (about)

     1  package app
     2  
     3  import (
     4  	"os"
     5  	"time"
     6  
     7  	"github.com/apex/up/internal/cli/root"
     8  
     9  	"github.com/apex/up/internal/stats"
    10  )
    11  
    12  // Run the command.
    13  func Run(version string) error {
    14  	defer stats.Client.ConditionalFlush(500, 24*time.Hour)
    15  	root.Cmd.Version(version)
    16  	_, err := root.Cmd.Parse(os.Args[1:])
    17  	return err
    18  }