craft_parts.plugins.go_use_plugin module¶
The Go Use plugin.
- class craft_parts.plugins.go_use_plugin.GoUsePlugin(*, properties, part_info)[source]¶
Bases:
Plugin
A plugin to setup the source into a go workspace.
The go plugin requires a go compiler installed on your system. This can be achieved by adding the appropriate golang package to
build-packages
, or to have it installed or built in a different part. In this case, the name of the part supplying the go compiler must be “go”.- Parameters:
properties (
PluginProperties
)part_info (
PartInfo
)
- get_build_commands()[source]¶
Return a list of commands to run during the build step.
- Return type:
list
[str
]
- get_build_environment()[source]¶
Return a dictionary with the environment to use in the build step.
- Return type:
dict
[str
,str
]
- get_build_packages()[source]¶
Return a set of required packages to install in the build environment.
- Return type:
set
[str
]
- get_build_snaps()[source]¶
Return a set of required snaps to install in the build environment.
- Return type:
set
[str
]
- classmethod get_out_of_source_build()[source]¶
Return whether the plugin performs out-of-source-tree builds.
- Return type:
bool
- properties_class¶
alias of
GoUsePluginProperties
- validator_class¶
alias of
GoPluginEnvironmentValidator
- class craft_parts.plugins.go_use_plugin.GoUsePluginProperties(**data)[source]¶
Bases:
PluginProperties
The part properties used by the Go Use plugin.
- Parameters:
data (
Any
)
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
plugin:
Literal
['go-use'
]¶
-
source:
str
¶