type logged interface {
GetLogID() int64
}
func maxLogID(items []logged) int64 {
max := int64(0)
for _, item := range items {
if item.GetLogID() > max {
max = item.GetLogID()
}
}
return max
}
type A struct {
logID int64
}
func (a A) GetLogID() int64 {
return a.logID
}
print(maxLogID(make([]A, 0)))