Documentation
¶
Index ¶
- func CheckOrCreateDir(path string) error
- func Clone(path string, repoName string, version string) error
- func CreateNewPpmConfig(path string) error
- func DoesPathExist(path string) (bool, error)
- func GetPluginName(name string) string
- func GetVersionOrNot(dependency string) (string, string)
- func IndexOf(target string, data []string) int
- func PlayLoadingAnim(loading chan interface{})
- func PrintDone()
- func StringSliceContains(target string, data []string) bool
- func Update(path string) error
- type Paths
- type PpmConfig
- func (ppm *PpmConfig) AddDependency(dependency string)
- func (ppm *PpmConfig) AddSubDependency(dependency string)
- func (ppm PpmConfig) HasDependency(dependency string) bool
- func (ppm PpmConfig) HasSubDependency(dependency string) bool
- func (ppm PpmConfig) PrettyPrint()
- func (ppm *PpmConfig) RemoveAllDependencies()
- func (ppm *PpmConfig) RemoveDependency(dependency string)
- func (ppm *PpmConfig) RemoveSubDependency(dependency string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckOrCreateDir ¶
Create a certain directory if it doesn't exist
func DoesPathExist ¶
Check wether an absolute path exists
func GetPluginName ¶
func GetVersionOrNot ¶
func PlayLoadingAnim ¶
func PlayLoadingAnim(loading chan interface{})
func StringSliceContains ¶
Check wether a certain item exists in a string slice
Types ¶
type Paths ¶
type Paths struct {
/*
The root of the project.
If the project is a game, the root is on the same level
as the godot config files.
If the project is a plugin, the root is somewhere under /addons
*/
Root string
// The path to the addons folder
Addons string
// The path to the ppm.json config file
ConfigFile string
}
Access different important paths in the GD project
func CreatePaths ¶
Create a new paths instance from the root path
func CreatePathsFromCwd ¶
Create a new paths instance from the current working directory
type PpmConfig ¶
type PpmConfig struct {
IsPlugin bool `json:"plugin"`
Dependencies []string `json:"dependencies"`
SubDependencies []string `json:"sub-dependencies"`
// contains filtered or unexported fields
}
Representing a ppm.json configuration file
func ParsePpmConfig ¶
Parse the ppm.json file to an object
func (*PpmConfig) AddDependency ¶
Add an item safely to the Dependencies property
func (*PpmConfig) AddSubDependency ¶
Add an item safely to the sub-dependencies property
func (PpmConfig) HasDependency ¶
Check wether the config file has a certain dependency
func (PpmConfig) HasSubDependency ¶
Check wether the config file has a certain sub-dependency
func (PpmConfig) PrettyPrint ¶
func (ppm PpmConfig) PrettyPrint()
func (*PpmConfig) RemoveAllDependencies ¶
func (ppm *PpmConfig) RemoveAllDependencies()
Remove ALL (sub)dependencies
func (*PpmConfig) RemoveDependency ¶
Remove an item safely from the sub-dependencies property by its name
func (*PpmConfig) RemoveSubDependency ¶
Remove an item safely from the Dependencies property by its name