code: func TagFilename(name, tag string) string {
  	dir, file := filepath.Dir(name), filepath.Base(name)
  	ext := filepath.Ext(file)
  	withoutExt := file[:len(file)-len(ext)]
  	return filepath.Join(dir, withoutExt+"~"+tag+ext)
  }
docs: // Inserts ~tag just before the extension of the filename.