Skip to content

Commit

Permalink
Changing AppSig ordering param name
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmog committed Aug 8, 2019
1 parent 7828309 commit ac03658
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions objs/app/signature/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Entry struct {
Name string
Comment string
Scope string
OrderedMatch bool
OrderFree bool

raw map[string] string
}
Expand All @@ -22,7 +22,7 @@ type Entry struct {
func (o *Entry) Copy(s Entry) {
o.Comment = s.Comment
o.Scope = s.Scope
o.OrderedMatch = s.OrderedMatch
o.OrderFree = s.OrderFree
}

/** Structs / functions for this namespace. **/
Expand All @@ -39,7 +39,7 @@ func (o *container_v1) Normalize() Entry {
ans := Entry{
Name: o.Answer.Name,
Comment: o.Answer.Comment,
OrderedMatch: util.AsBool(o.Answer.OrderedMatch),
OrderFree: util.AsBool(o.Answer.OrderFree),
}

switch o.Answer.Scope {
Expand Down Expand Up @@ -67,15 +67,15 @@ type entry_v1 struct {
Name string `xml:"name,attr"`
Comment string `xml:"comment,omitempty"`
Scope string `xml:"scope,omitempty"`
OrderedMatch string `xml:"order-free"`
OrderFree string `xml:"order-free"`
Sigs *util.RawXml `xml:"and-condition"`
}

func specify_v1(e Entry) interface{} {
ans := entry_v1{
Name: e.Name,
Comment: e.Comment,
OrderedMatch: util.YesNo(e.OrderedMatch),
OrderFree: util.YesNo(e.OrderFree),
}

switch e.Scope {
Expand Down
6 changes: 3 additions & 3 deletions objs/app/signature/testdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ func getTests() []tc {
Name: "v1",
Comment: "my comment",
Scope: ScopeSession,
OrderedMatch: false,
OrderFree: false,
}},
{"v1 raw no order", version.Number{7, 1, 0, ""}, Entry{
Name: "v1",
Comment: "my comment",
Scope: ScopeSession,
OrderedMatch: false,
OrderFree: false,
raw: map[string] string{
"sigs": "and sig config",
},
}},
{"v1 no raw ordered", version.Number{7, 1, 0, ""}, Entry{
Name: "v1",
Scope: ScopeTransaction,
OrderedMatch: true,
OrderFree: true,
}},
}
}

0 comments on commit ac03658

Please sign in to comment.