"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "go/pkg/astset/astset.go" between
Netspoc-6.026.tar.gz and Netspoc-6.027.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.

astset.go  (Netspoc-6.026):astset.go  (Netspoc-6.027)
skipping to change at line 112 skipping to change at line 112
return true return true
} }
return false return false
}) })
if !found { if !found {
return fmt.Errorf("Can't find %s", name) return fmt.Errorf("Can't find %s", name)
} }
return nil return nil
} }
func (s *State) CreateToplevel(fullName, file string, n ast.Toplevel) { func (s *State) CreateToplevel(file string, n ast.Toplevel) {
idx := s.getFileIndex(file) idx := s.getFileIndex(file)
nodes := s.fileNodes[idx] nodes := s.fileNodes[idx]
cp := make([]ast.Toplevel, 0, len(nodes)+1) cp := make([]ast.Toplevel, 0, len(nodes)+1)
inserted := false inserted := false
typ, name := getTypeName(fullName) typ, name := getTypeName(n.GetName())
nLower := strings.ToLower(name) nLower := strings.ToLower(name)
for i, toplevel := range nodes { for i, toplevel := range nodes {
typ2, name2 := getTypeName(toplevel.GetName()) typ2, name2 := getTypeName(toplevel.GetName())
if typ2 == typ && strings.ToLower(name2) > nLower { if typ2 == typ && strings.ToLower(name2) > nLower {
cp = append(cp, n) cp = append(cp, n)
cp = append(cp, nodes[i:]...) cp = append(cp, nodes[i:]...)
inserted = true inserted = true
break break
} }
cp = append(cp, toplevel) cp = append(cp, toplevel)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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