Documentation
¶
Index ¶
- Constants
- func AddAndInstall(root, goExec, module, version string) error
- func AddDependency(root string, module string, version string) error
- func EnsureSDK(root, goExec string) error
- func Install(root string, goExec string) error
- func RemoveAndInstall(root, goExec, module string) error
- func RemoveDependency(root string, module string) error
- func Tidy(root string, goExec string) error
- func WriteDepsGo(root string, cfg GoxJSON, requiredImports ...string) error
- func WriteGoxJSON(root string, cfg GoxJSON) error
- type Dependency
- type Frameworks
- type GoxJSON
- type Toolchain
Constants ¶
const DepsGoFile = "deps.go"
const GoxJSONFile = "gox.json"
Variables ¶
This section is empty.
Functions ¶
func AddAndInstall ¶
AddAndInstall adds a dependency and reconciles the Go module atomically. If reconciliation fails, dependency metadata and Go module files are restored.
func EnsureSDK ¶
EnsureSDK aligns an existing project's SDK with the server before plugins are compiled. Matching projects require no Go command or network access.
func RemoveAndInstall ¶
RemoveAndInstall removes a dependency and reconciles the Go module atomically. If reconciliation fails, dependency metadata and Go module files are restored.
func RemoveDependency ¶
func Tidy ¶
Tidy synchronizes deps.go and go.mod/go.sum from gox.json without modifying gox.json. deps.go remains in the project so the Go toolchain can see dependencies that are referenced only by GOX files.
func WriteDepsGo ¶
WriteDepsGo synchronizes the permanent Go dependency bridge used to make dependencies declared by GOX files visible to the Go toolchain.
func WriteGoxJSON ¶
Types ¶
type Dependency ¶
func SortedDependencies ¶
func SortedDependencies(cfg GoxJSON) []Dependency
type Frameworks ¶
type GoxJSON ¶
type GoxJSON struct {
Dependencies map[string]string `json:"dependencies"`
Toolchain Toolchain `json:"toolchain"`
Frameworks Frameworks `json:"frameworks"`
}
func NewGoxJSON ¶
func NewGoxJSON() GoxJSON