示例#1
0
func (cf *Config) GetName(name string, realm string) string {
	s := strings.Replace(cf.NameFormat, "{realm}", util.Safe_Realm(realm), -1)
	s = strings.Replace(s, "{name}", name, -1)
	return s
}
示例#2
0
func (cf *Config) GetTimedName(name string, realm string, ts time.Time) string {
	s := ts.Format(cf.TimedNameFormat)
	s = strings.Replace(s, "{realm}", util.Safe_Realm(realm), -1)
	s = strings.Replace(s, "{name}", name, -1)
	return s
}