Files
moxa/stdlib/go1_16_path_filepath.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

45 lines
1.6 KiB
Go

// Code generated by 'yaegi extract path/filepath'. DO NOT EDIT.
// +build go1.16
package stdlib
import (
"go/constant"
"go/token"
"path/filepath"
"reflect"
)
func init() {
Symbols["path/filepath/filepath"] = map[string]reflect.Value{
// function, constant and variable definitions
"Abs": reflect.ValueOf(filepath.Abs),
"Base": reflect.ValueOf(filepath.Base),
"Clean": reflect.ValueOf(filepath.Clean),
"Dir": reflect.ValueOf(filepath.Dir),
"ErrBadPattern": reflect.ValueOf(&filepath.ErrBadPattern).Elem(),
"EvalSymlinks": reflect.ValueOf(filepath.EvalSymlinks),
"Ext": reflect.ValueOf(filepath.Ext),
"FromSlash": reflect.ValueOf(filepath.FromSlash),
"Glob": reflect.ValueOf(filepath.Glob),
"HasPrefix": reflect.ValueOf(filepath.HasPrefix),
"IsAbs": reflect.ValueOf(filepath.IsAbs),
"Join": reflect.ValueOf(filepath.Join),
"ListSeparator": reflect.ValueOf(constant.MakeFromLiteral("58", token.INT, 0)),
"Match": reflect.ValueOf(filepath.Match),
"Rel": reflect.ValueOf(filepath.Rel),
"Separator": reflect.ValueOf(constant.MakeFromLiteral("47", token.INT, 0)),
"SkipDir": reflect.ValueOf(&filepath.SkipDir).Elem(),
"Split": reflect.ValueOf(filepath.Split),
"SplitList": reflect.ValueOf(filepath.SplitList),
"ToSlash": reflect.ValueOf(filepath.ToSlash),
"VolumeName": reflect.ValueOf(filepath.VolumeName),
"Walk": reflect.ValueOf(filepath.Walk),
"WalkDir": reflect.ValueOf(filepath.WalkDir),
// type definitions
"WalkFunc": reflect.ValueOf((*filepath.WalkFunc)(nil)),
}
}