mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Collapsed repetitive code into generic functions.
Establishing patterns for individual objects, discovering designs to collapse what would be an obscene amount of repetitive code.
This commit is contained in:
@@ -22,6 +22,11 @@ type HasValueNode[T any] interface {
|
||||
*T
|
||||
}
|
||||
|
||||
// HasExtensions is implemented by any object that exposes extensions
|
||||
type HasExtensions[T any] interface {
|
||||
GetExtensions() map[KeyReference[string]]ValueReference[any]
|
||||
}
|
||||
|
||||
// HasValue is implemented by NodeReference and ValueReference to return the yaml.Node backing the value.
|
||||
type HasValue[T any] interface {
|
||||
GetValue() T
|
||||
|
||||
Reference in New Issue
Block a user