@@ -20,16 +20,6 @@ import (
2020 "github.com/ydb-platform/ydb-go-sdk/v3/internal/xerrors"
2121)
2222
23- const (
24- noTags = 0
25- oneTag = 1
26- twoTags = 2
27- )
28-
29- //go:linkname build_goodOSArchFile go/build.(*Context).goodOSArchFile
30- //nolint:revive
31- func build_goodOSArchFile (* build.Context , string , map [string ]bool ) bool
32-
3323//nolint:gocyclo
3424func main () {
3525 var (
@@ -318,38 +308,6 @@ func buildFunc(info *types.Info, traces map[string]*Trace, fn *ast.FuncType) (re
318308 )
319309}
320310
321- func splitOSArchTags (ctx * build.Context , name string ) (base , tags , ext string ) {
322- fileTags := make (map [string ]bool )
323- build_goodOSArchFile (ctx , name , fileTags )
324- ext = filepath .Ext (name )
325- switch len (fileTags ) {
326- case noTags : // *
327- base = strings .TrimSuffix (name , ext )
328-
329- case oneTag : // *_GOOS or *_GOARCH
330- i := strings .LastIndexByte (name , '_' )
331-
332- base = name [:i ]
333- tags = strings .TrimSuffix (name [i :], ext )
334-
335- case twoTags : // *_GOOS_GOARCH
336- var i int
337- i = strings .LastIndexByte (name , '_' )
338- i = strings .LastIndexByte (name [:i ], '_' )
339-
340- base = name [:i ]
341- tags = strings .TrimSuffix (name [i :], ext )
342-
343- default :
344- panic (fmt .Sprintf (
345- "gtrace: internal error: unexpected number of OS/arch tags: %d" ,
346- len (fileTags ),
347- ))
348- }
349-
350- return
351- }
352-
353311type Package struct {
354312 * types.Package
355313
0 commit comments