assign-value

The assign-value advice changes the initial value of a package-level var or const declaration matched by value-declaration.

If the value is susceptible to match a const, the template must produce only compile-time constant values.

Examples

assign-value:
  template: "true"
assign-value:
  imports:
    regexp: regexp
  lang: go1.18
  template: "regexp.MustCompile(`^.?$|^(..+?)\\1+$ `)"