src/server/pkg/hashtree/error.go
func Code(err error) ErrCode {
	if err == nil {
		return OK
	}

	hte, ok := err.(*hashTreeError)
	if !ok {
		return Unknown
	}
	return hte.code
}
func Code(err error) ErrCode {
	if err == nil {
		return OK
	}

	hte, ok := err.(*hashTreeError)
	if !ok {
		return Unknown
	}
	return hte.code
}
func Code ( err error ) ErrCode { if err == nil { return OK } hte , ok := err . ( * hashTreeError ) if ! ok { return Unknown } return hte . code }
// Code returns the "error code"  of 'err' if it was returned by one of the
// HashTree methods, or "Unknown" if 'err' was emitted by some other function
// (error codes are defined in interface.go)
Code returns the error code of err if it was returned by one of the HashTree methods or Unknown if err was emitted by some other function ( error codes are defined in interface . go )