It looks like the cros-go eclass is
hard-coded to substitute only `main.Version` when a special variable is present. I would like to set more than just this one value.
I can see a few possibilities, in order of less constraints:
- An associative array named something like CROS_GO_VARIABLES or something like that that maps `pkg.var => value` and passes each into ldflags as an argument to -X.
- An array named CROS_GO_LDFLAGS that lets you pass in whatever ldflags you want.
- "ldflags=${CROS_GO_LDFLAGS[@]}"
- An array named CROS_GO_BUILD_OPTS that lets you pass anything into the cros_go build step
- cros_go build -v ... "${CROS_GO_BUILD_OPTS[@]}" ...
Any preferences, or other eclasses that serve as an example to follow?