// Copyright 2022 schukai GmbH // SPDX-License-Identifier: AGPL-3.0 package pathfinder import ( "errors" "reflect" ) type InvalidPathError error func newInvalidPathError(path string) InvalidPathError { return InvalidPathError(errors.New("invalid path " + path)) } type UnsupportedTypeAtTopOfPathError error func newUnsupportedTypeAtTopOfPathError(path string, t reflect.Type) UnsupportedTypeAtTopOfPathError { return UnsupportedTypeAtTopOfPathError(errors.New("unsupported type " + t.String() + " at top of path " + path)) } type UnsupportedTypePathError error func newUnsupportedTypePathError(path string, t reflect.Type) UnsupportedTypePathError { return UnsupportedTypePathError(errors.New("unsupported type " + t.String() + " at path " + path)) } type CannotSetError error func newCannotSetError(name string) CannotSetError { return CannotSetError(errors.New("cannot set " + name)) } type InvalidTypeForPathError error func newInvalidTypeForPathError(path string, pt string, nt string) InvalidTypeForPathError { return InvalidTypeForPathError(errors.New("invalid type for path " + path + ": expected " + pt + ", got " + nt)) }