printUsage.go 493 B

123456789101112131415
  1. package flags
  2. import (
  3. "flag"
  4. "fmt"
  5. "os"
  6. )
  7. // Print help information for the end-user
  8. func (flags *Flags) printUsage() {
  9. fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
  10. fmt.Fprintf(flag.CommandLine.Output(), "\nPut every row of a Sudoku puzzle as paramters.\nUse '0' for what is currently blank in the puzzle you wish to solve.\n\n")
  11. fmt.Fprintf(flag.CommandLine.Output(), "Example: %s -row1 ... -row2 ... -row3 ... (etc)\n\n", os.Args[0])
  12. flag.PrintDefaults()
  13. }