Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Hash = "development"
View Source
var RootCommand = &cobra.Command{ Use: "cocainate", Short: "keep screen awake", Long: "keep screen awake", Version: Version, Args: func(cmd *cobra.Command, args []string) error { if pid != 0 && duration == 0 { return errors.New("process poling interval must be provided via the -d flag") } return nil }, RunE: func(cmd *cobra.Command, args []string) error { s := session.New(duration, pid) if err := s.Start(); err != nil { return err } if err := s.Wait(); err != nil { return err } if flag.Lookup("test.v") == nil { fmt.Print("\033[2K\r") } return nil }, }
View Source
var Version = "development"
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.