- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for removeDups (0.15 sec)
-
src/cmd/vendor/golang.org/x/mod/modfile/work.go
} return nil } func (f *WorkFile) SortBlocks() { f.removeDups() // otherwise sorting is unsafe for _, stmt := range f.Syntax.Stmt { block, ok := stmt.(*LineBlock) if !ok { continue } sort.SliceStable(block.Line, func(i, j int) bool { return lineLess(block.Line[i], block.Line[j]) }) } } // removeDups removes duplicate replace directives. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 18:34:56 UTC 2024 - 7.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/modfile/rule.go
// logic (MVS). // // retract directives are not de-duplicated since comments are // meaningful, and versions may be retracted multiple times. func (f *File) removeDups() { removeDups(f.Syntax, &f.Exclude, &f.Replace) } func removeDups(syntax *FileSyntax, exclude *[]*Exclude, replace *[]*Replace) { kill := make(map[*Line]bool) // Remove duplicate excludes. if exclude != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 18:34:56 UTC 2024 - 46.5K bytes - Viewed (0)