pantheon-se/go-composer
最新稳定版本:1.0.1
Composer 安装命令:
composer require pantheon-se/go-composer
包简介
Installs Go into vendor/bin
README 文档
README
Go Composer
Composer Plugin to install other utilities via Composer with Go.
Based on node-composer by mariusbuescher, this Composer plugin will install a version of Go into your vendor/bin directory so that they are available to use during your Composer builds. This plugin helps automate the download of the binaries which are linked to the bin-directory specified in your composer.json.
Once installed, you can then use Go in your composer-scripts.
Setup
Simply install the plugin, and the latest Go will be installed - no other configurations are necessary. Optionally, you can specify the go-version in your composer.json extra configs to declare a specific version of Go.
Example composer.json
{
"name": "my/project",
"type": "project",
"license": "MIT",
"require": {
"pantheon-se/go-composer": "*"
},
"extra": {
"pantheon-se": {
"go-composer": {
"go-version": true
}
}
},
"config": {
"allow-plugins": {
"pantheon-se/go-composer": true
}
}
}
Configuration
There are three parameters you can configure:
- Go version (
go-version) - The download url template for the Go binary archives (
go-download-url).
In the Node download url, replace the following placeholders with your specific needs:
- version:
${version} - type of your os:
${osType} - system architecture:
${architecture} - file format
${format}
Example composer.json with specific versions of Go
{
"extra": {
"pantheon-se": {
"go-composer": {
"go-version": "1.20.2",
"go-download-url": "https://go.dev/dl/go${version}.${osType}-${architecture}.${format}"
}
}
}
}
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-14