github.com/switchupcb/yaegi@v0.10.2/interp/doc.go (about)

     1  /*
     2  Package interp provides a complete Go interpreter.
     3  
     4  For the Go language itself, refer to the official Go specification
     5  https://golang.org/ref/spec.
     6  
     7  Importing packages
     8  
     9  Packages can be imported in source or binary form, using the standard
    10  Go import statement. In source form, packages are searched first in the
    11  vendor directory, the preferred way to store source dependencies. If not
    12  found in vendor, sources modules will be searched in GOPATH.
    13  
    14  Binary form packages are compiled and linked with the interpreter
    15  executable, and exposed to scripts with the Use method. The extract
    16  subcommand of yaegi can be used to generate package wrappers.
    17  
    18  Custom build tags
    19  
    20  Custom build tags allow to control which files in imported source
    21  packages are interpreted, in the same way as the "-tags" option of the
    22  "go build" command. Setting a custom build tag spans globally for all
    23  future imports of the session.
    24  
    25  A build tag is a line comment that begins
    26  
    27  	// yaegi:tags
    28  
    29  that lists the build constraints to be satisfied by the further
    30  imports of source packages.
    31  
    32  For example the following custom build tag
    33  
    34  	// yaegi:tags noasm
    35  
    36  Will ensure that an import of a package will exclude files containing
    37  
    38  	// +build !noasm
    39  
    40  And include files containing
    41  
    42  	// +build noasm
    43  */
    44  package interp
    45  
    46  // BUG(marc): Support for recursive types is incomplete.
    47  // BUG(marc): Support of types implementing multiple interfaces is incomplete.