"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "go/pkg/ast/attribute.go" between
Netspoc-6.032.tar.gz and Netspoc-6.033.tar.gz

About: NetSPoC is a network security policy compiler (using its own description language) to manage all the packet filter devices inside your network topology.

attribute.go  (Netspoc-6.032):attribute.go  (Netspoc-6.033)
skipping to change at line 26 skipping to change at line 26
} }
return &Attribute{Name: name, ValueList: vl} return &Attribute{Name: name, ValueList: vl}
} }
func (n *TopStruct) GetAttr(name string) string { func (n *TopStruct) GetAttr(name string) string {
for _, a := range n.Attributes { for _, a := range n.Attributes {
if a.Name == name { if a.Name == name {
l := a.ValueList l := a.ValueList
if len(l) > 0 { if len(l) > 0 {
return l[0].Value return l[0].Value
} else {
return ""
} }
} }
} }
return "" return ""
} }
func (obj *Attribute) Remove(name string) { func (obj *Attribute) Remove(name string) {
cp := make([]*Attribute, 0, len(obj.ComplexValue)-1) cp := make([]*Attribute, 0, len(obj.ComplexValue)-1)
for _, a := range obj.ComplexValue { for _, a := range obj.ComplexValue {
if a.Name != name { if a.Name != name {
 End of changes. 1 change blocks. 
2 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)