File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- // TODO(rfindley): once the new AddExistingFiles API has had some time to soak
6
- // in std, use it in x/tools and change the condition below to !go1.25.
7
-
8
- //go:build !addexistingfiles
5
+ //go:build !go1.25
9
6
10
7
package tokeninternal
11
8
@@ -22,9 +19,6 @@ import (
22
19
// AddExistingFiles adds the specified files to the FileSet if they
23
20
// are not already present. It panics if any pair of files in the
24
21
// resulting FileSet would overlap.
25
- //
26
- // TODO(adonovan): replace with FileSet.AddExistingFiles in go1.25,
27
- // which is much more efficient.
28
22
func AddExistingFiles (fset * token.FileSet , files []* token.File ) {
29
23
30
24
// This function cannot be implemented as:
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- // TODO(rfindley): once the new AddExistingFiles API has had some time to soak
6
- // in std, use it here behind the go1.25 build tag.
7
-
8
- //go:build addexistingfiles
5
+ //go:build go1.25
9
6
10
7
package tokeninternal
11
8
@@ -14,8 +11,6 @@ import "go/token"
14
11
// AddExistingFiles adds the specified files to the FileSet if they
15
12
// are not already present. It panics if any pair of files in the
16
13
// resulting FileSet would overlap.
17
- //
18
- // TODO(adonovan): eliminate when go1.25 is always available.
19
14
func AddExistingFiles (fset * token.FileSet , files []* token.File ) {
20
15
fset .AddExistingFiles (files ... )
21
16
}
You can’t perform that action at this time.
0 commit comments