13 lines
278 B
Go
13 lines
278 B
Go
|
package util
|
||
|
|
||
|
func GetMappedModelName(modelName string, mapping map[string]string) (string, bool) {
|
||
|
if mapping == nil {
|
||
|
return modelName, false
|
||
|
}
|
||
|
mappedModelName := mapping[modelName]
|
||
|
if mappedModelName != "" {
|
||
|
return mappedModelName, true
|
||
|
}
|
||
|
return modelName, false
|
||
|
}
|