Revision dc2715af68b93611a116b83fca90714e7c5cb50b authored by Adin Schmahmann on 21 July 2021, 16:52:52 UTC, committed by GitHub on 21 July 2021, 16:52:52 UTC
2 parent s 179d1d1 + 3b21fcf
Raw File
gen_main.sh
#!/usr/bin/env bash

dir=${1:?first parameter with dir to work in is required}
pkg=${2:?second parameter with full name of the package is required}
main_pkg="$dir/main"

shortpkg="uniquepkgname"

mkdir -p "$main_pkg"

cat > "$main_pkg/main.go" <<EOL
package main
import (
	$shortpkg "$pkg"
)

var Plugins = $shortpkg.Plugins //nolint

func main() {
	panic("this is a plugin, build it as a plugin, this is here as for go#20312")
}
EOL
back to top