meowlib/servercard.go
ycc df9c6b5d46
Some checks failed
continuous-integration/drone/push Build is failing
Refactor GetUid() method and add new tests for server storage
2024-02-10 11:32:44 +01:00

13 lines
270 B
Go

package meowlib
func (sc *ServerCard) GetUid() string {
if len(sc.Login) > 0 || len(sc.Password) > 0 {
return sc.Login + ":" + sc.Password + "@" + sc.Url
}
return sc.Url
}
func (sc *ServerCard) IsSame(sc1 *ServerCard) bool {
return sc.GetUid() == sc1.GetUid()
}