Files
moxa/stdlib/go1_15_go_build.go
Marc Vertes d16bd4bcdb interp: fix package name extraction from import path
The heuristic to generate a package name identifier was incorrect. Now for binary packages, the package identifier is obtained by a symbol, generated by extract, which contains the string argument of package statement in source file. This should ensure an always correct default package identifier. 

Fixes #1095.
2021-05-10 11:20:07 +02:00

34 lines
1.2 KiB
Go

// Code generated by 'yaegi extract go/build'. DO NOT EDIT.
// +build go1.15,!go1.16
package stdlib
import (
"go/build"
"reflect"
)
func init() {
Symbols["go/build/build"] = map[string]reflect.Value{
// function, constant and variable definitions
"AllowBinary": reflect.ValueOf(build.AllowBinary),
"ArchChar": reflect.ValueOf(build.ArchChar),
"Default": reflect.ValueOf(&build.Default).Elem(),
"FindOnly": reflect.ValueOf(build.FindOnly),
"IgnoreVendor": reflect.ValueOf(build.IgnoreVendor),
"Import": reflect.ValueOf(build.Import),
"ImportComment": reflect.ValueOf(build.ImportComment),
"ImportDir": reflect.ValueOf(build.ImportDir),
"IsLocalImport": reflect.ValueOf(build.IsLocalImport),
"ToolDir": reflect.ValueOf(&build.ToolDir).Elem(),
// type definitions
"Context": reflect.ValueOf((*build.Context)(nil)),
"ImportMode": reflect.ValueOf((*build.ImportMode)(nil)),
"MultiplePackageError": reflect.ValueOf((*build.MultiplePackageError)(nil)),
"NoGoError": reflect.ValueOf((*build.NoGoError)(nil)),
"Package": reflect.ValueOf((*build.Package)(nil)),
}
}