2 ms·
On Hacker News you need to indent code examples with four spaces - like this: pgContainer, err := postgres.RunContainer( ctx, testcontainers.WithIm
by simonw 3y ago
On Hacker News you need to indent code examples with four spaces - like this:
pgContainer, err := postgres.RunContainer(
ctx, testcontainers.WithImage("postgres:15.3-alpine"
),
postgres.WithInitScripts(filepath.Join("..", "testdata", "init-db.sql")),
postgres.WithDatabase("test-db"),
postgres.WithUsername("postgres"),
postgres.WithPassword("postgres"),
testcontainers.WithWaitStrategy(
wait.ForLog("database system is ready to accept connections").
- altairprime 3y agoAnd, to quote non-code text, you have to do it manually; there is no formatting operator and the code-indent method won’t work (unreadable at many browser widths). I tend to do it like so: > *Paragraph one.* > *Paragraph two. Etc.* Which produces the desired effect: > Paragraph ‘one’. > Paragraph two. (To use a * in a paragraph that’s italic-wrapped, backslash it.)