code: func (s *Spinner) erase() {
  	n := utf8.RuneCountInString(s.lastOutput)
  	if runtime.GOOS == "windows" {
  		clearString := "\r"
  		for i := 0; i < n; i++ {
  			clearString += " "
  		}
  		fmt.Fprintf(s.Writer, clearString)
  		return
  	}
  	del, _ := hex.DecodeString("7f")
  	for _, c := range []string{
  		"\b",
  		string(del),
  		"\b",
  		"\033[K", // for macOS Terminal
  	} {
  		for i := 0; i < n; i++ {
  			fmt.Fprintf(s.Writer, c)
  		}
  	}
  	s.lastOutput = ""
  }
docs: // erase deletes written characters
  //
  // Caller must already hold s.lock.