mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 12:37:49 +00:00
What-changed is ready
Needs documenting, but the feature is ready for an application to really stress test the model and logic. Guess what's next :) (after docs) Signed-off-by: Dave Shanley <dave@quobix.com>
This commit is contained in:
@@ -51,18 +51,12 @@ func CreateChange(changes *[]*Change, changeType int, property string, leftValue
|
||||
func CreateContext(l, r *yaml.Node) *ChangeContext {
|
||||
ctx := new(ChangeContext)
|
||||
if l != nil {
|
||||
ctx.OriginalLine = l.Line
|
||||
ctx.OriginalColumn = l.Column
|
||||
} else {
|
||||
ctx.OriginalLine = -1
|
||||
ctx.OriginalColumn = -1
|
||||
ctx.OriginalLine = &l.Line
|
||||
ctx.OriginalColumn = &l.Column
|
||||
}
|
||||
if r != nil {
|
||||
ctx.NewLine = r.Line
|
||||
ctx.NewColumn = r.Column
|
||||
} else {
|
||||
ctx.NewLine = -1
|
||||
ctx.NewColumn = -1
|
||||
ctx.NewLine = &r.Line
|
||||
ctx.NewColumn = &r.Column
|
||||
}
|
||||
return ctx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user