Skip to content

Invalid Go/Java syntax in six code examples under docs/iac/concepts (resource options, config, stacks, secrets) #21042

Description

@workprentice

A paren/brace-balance audit of fenced Go and Java code blocks under content/docs/iac/concepts/ turned up six examples with unbalanced delimiters, each confirmed to fail gofmt -e before the fix and parse cleanly after:

  1. content/docs/iac/concepts/resources/options/aliases.md (URN alias example) — the Go snippet has a stray extra ) on its own line after the closing })). Paren count 3 open / 4 close.
  2. content/docs/iac/concepts/resources/options/replaceonchanges.md — the Go example is missing its final closing ). Paren count 4 open / 3 close.
  3. content/docs/iac/concepts/resources/options/version.md — the Java example has a stray space in .version("2.10.0" ) and is missing the closing ) before the statement terminator (.build(); should be .build());), inconsistent with the correct Java pattern used throughout aliases.md.
  4. content/docs/iac/concepts/config.md — the Go pulumi.Run(func(ctx *pulumi.Context) error { ... }) example is missing the closing ) for the pulumi.Run( call.
  5. content/docs/iac/concepts/stacks.md — the same pulumi.Run(...) pattern is missing its closing ).
  6. content/docs/iac/concepts/secrets/_index.md — two separate Go examples have the same missing-closing-paren defect on pulumi.Run(...); one of the two is also missing its return nil statement, which the error-returning closure requires to compile.

All six are readers copy-pasting broken code that will not compile. A companion PR with the fixes is forthcoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions