code: func main() {
  	var args []string
  
  	// Detect the current user to figure out what their ~ is.
  	usr, err := user.Current()
  	fatalOnError(err)
  
  	// Load the list of aliases from the file at dbPath.
  	aliases, err := LoadAliases(path.Join(usr.HomeDir, dbPath))
  	fatalOnError(err)
  	defer aliases.Close()
  
  	// Parse arguments which might get passed to "wol".
  	parser := flags.NewParser(&cliFlags, flags.Default & ^flags.HelpFlag)
  	args, err = parser.Parse()
  
  	ec := 0
  	switch {
  
  	// Parse Error, print usage.
  	case err != nil:
  		ec = printUsageGetExitCode("", 1)
  
  	// No arguments, or help requested, print usage.
  	case len(os.Args) == 1 || cliFlags.Help:
  		ec = printUsageGetExitCode("", 0)
  
  	// "--version" requested.
  	case cliFlags.Version:
  		fmt.Printf("%s\n", wol.Version)
  
  	// Make sure we are being asked to run a something.
  	case len(args) == 0:
  		ec = printUsageGetExitCode("No command specified, see usage:\n", 1)
  
  	// All other cases go here.
  	case true:
  		cmd, cmdArgs := strings.ToLower(args[0]), args[1:]
  		if fn, ok := cmdMap[cmd]; ok {
  			err = fn(cmdArgs, aliases)
  		} else {
  			err = wakeCmd(args, aliases)
  		}
  		fatalOnError(err)
  	}
  	os.Exit(ec)
  }
docs: // Main entry point for binary.