/
phyalex
/
tree_research
Обзор
Документация
Войти
/
phyalex
/
tree_research
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
utils/utils.go
35 строк
702 B
phyalex
Added KristianBallTree and KristianKDTree
07 мар 2025, 04:04
07 мар 2025, 04:04
a4c0f38
Код
Авторство
О чём код?
package utils type UnsupportedError struct{} func (err *UnsupportedError) Error() string { return "Unsupported method" } func Unsupported() error { return &UnsupportedError{} } // type CannotFindNearestError struct { // cause error // } // // func (err *CannotFindNearestError) Error() string { // return "CannotFindNearest: \n" + err.cause.Error() // } // // func CannotFindNearest(cause error) error { // return &CannotFindNearestError{cause} // } // // type BusinessError struct { // cause error // } // // func (err *BusinessError) Error() string { // return err.cause.Error() // } // // func NewBusinessError(cause error) error { // return &BusinessError{cause} // }