Documentation
¶
Index ¶
- func AskForLocales(defaultLocales ...[]string) []string
- func DetectPackageManager() (string, error)
- func EnsureStringAndValid(name string, value interface{}, err error) (string, error)
- func GetBinPath() (string, error)
- func GetDataFromMetadata(key string) (interface{}, error)
- func GetDevDest() (string, error)
- func InstallPackage(pm, binName string, pkgNames map[string]string) error
- func InstallPlasmoidPreview(pm string) error
- func InstallQmlformat(pm string) error
- func IsInstalled() (bool, string, error)
- func IsLinked() bool
- func IsPackageInstalled(name string) bool
- func IsValidPlasmoid() bool
- func LoadConfigRC() types.Config
- func UpdateMetadata(key string, value interface{}, sectionOpt ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AskForLocales ¶ added in v0.0.3
func EnsureStringAndValid ¶ added in v0.0.3
func GetBinPath ¶
func GetDataFromMetadata ¶
GetDataFromMetadata reads metadata.json and returns the requested key's value from the KPlugin section
func InstallPlasmoidPreview ¶
func InstallQmlformat ¶
func IsValidPlasmoid ¶
func IsValidPlasmoid() bool
func LoadConfigRC ¶
func UpdateMetadata ¶
UpdateMetadata updates a key in the metadata.json file.
Parameters:
- key: The key inside the section to update or create.
- value: The new value to assign to the key.
- section: The top-level section in metadata.json where the key is located. By default, this is "KPlugin", which is the standard location for Plasmoid metadata. If you're updating a key at the root level of the JSON, pass "." as the section.
Behavior:
- If the section does not exist, it will be created automatically.
- If the file cannot be read or parsed, a descriptive error will be returned.
- The resulting JSON will be indented for readability.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.