code: func BaseName(s string) string {
  
  	// Replace certain joining characters with a dash
  	baseName := baseNameSeparators.ReplaceAllString(s, "-")
  
  	// Remove illegal characters for names, replacing some common separators with -
  	baseName = cleanString(baseName, illegalName)
  
  	// NB this may be of length 0, caller must check
  	return baseName
  }
docs: // BaseName makes a string safe to use in a file name, producing a sanitized basename replacing . or / with -.
  // No attempt is made to normalise a path or normalise case.