code: func Fix(args []string) []string {
  	// Find the first flag argument or '--'.
  	flagIdx := -1
  	for i, arg := range args {
  		if strings.HasPrefix(arg, "-") {
  			flagIdx = i
  			break
  		}
  	}
  
  	if flagIdx == -1 {
  		return args // no arguments at all or only positional arguments
  	}
  
  	// Move positional arguments after the flags.
  	buf := make([]string, 0, len(args))
  	return append(append(buf, args[flagIdx:]...), args[:flagIdx]...)
  }
docs: // Fix rearranges an `args []string` command line to enable positional arguments
  // to be allowed before flag arguments, which makes some invocations look more
  // natural.
  //
  // Converts [pos1 pos2 -flag value pos3] into [-flag value pos3 pos1 pos2].