 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package module provides helper functions to handle GX modules.
Index ¶
- type Module
- func (mod *Module) Belongs(importPath string) bool
- func (mod *Module) Deps() []*module.Version
- func (mod *Module) FS() fs.ReadDirFS
- func (mod *Module) File() *modfile.File
- func (mod *Module) GXPathFromOS(osPath string) (string, error)
- func (mod *Module) ImportToOSPath(importPath string) (string, error)
- func (mod *Module) Name() string
- func (mod *Module) OSPath(path string) string
- func (mod *Module) Root() string
- func (mod *Module) Split(importPath string) (packagePath, packageName string, err error)
- func (mod *Module) VersionOf(path string) string
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
	// contains filtered or unexported fields
}
    Module is the GX module.
func New ¶
New returns a new module given a directory. If no directory is given (i.e. empty string), then the current working directory is used. If no go.mod can be find, returns a nil module with a nil error.
func (*Module) GXPathFromOS ¶ added in v0.5.0
GXPathFromOS returns the GX package from an OS path. Returns an empty string if the path does not belong to the package.
func (*Module) ImportToOSPath ¶
ImportToOSPath converts an import path to a path on the operating system.
 Click to show internal directories. 
   Click to hide internal directories.