code: func CopyAndChangePackage(in, out, pkg string) error {
  	inf, err := os.Open(in)
  	if err != nil {
  		return err
  	}
  	defer inf.Close()
  	outf, err := os.Create(out)
  	if err != nil {
  		return err
  	}
  	defer outf.Close()
  	scanner := bufio.NewScanner(inf)
  	matched := false
  	for scanner.Scan() {
  		line := scanner.Text()
  		if !matched && packageRe.MatchString(line) {
  			matched = true
  			line = packageRe.ReplaceAllString(line, fmt.Sprintf("package %s", pkg))
  		}
  		fmt.Fprintln(outf, line)
  	}
  	if err := scanner.Err(); err != nil {
  		return err
  	}
  	return nil
  }
docs: // CopyAndChangePackage copies file `in` to file `out`, rewriting the
  // `package` declaration to `pkg`.