mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-27 21:58:04 +08:00
bake: fix variadic_params inconsistency for user functions
There was inconsistency between variables used for function definitions in HCL and JSON format. Updated JSON to match HCL, fixed documentation and removed the unused code from userfunc pkg (based on HCL upstream) to avoid confusion. Theoretically we could add some temporary backwards compatibility for the JSON format but I think it is unlikely that someone uses JSON format for this and also defined variadic parameters. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@@ -42,7 +42,7 @@ type variableValidation struct {
|
||||
type functionDef struct {
|
||||
Name string `json:"-" hcl:"name,label"`
|
||||
Params *hcl.Attribute `json:"params,omitempty" hcl:"params"`
|
||||
Variadic *hcl.Attribute `json:"variadic_param,omitempty" hcl:"variadic_params"`
|
||||
Variadic *hcl.Attribute `json:"variadic_params,omitempty" hcl:"variadic_params"`
|
||||
Result *hcl.Attribute `json:"result,omitempty" hcl:"result"`
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user