Create a small Go project under /app/ whose source files are formatted using Go's standard formatter.
Requirements
Implement a simple Go program in /app/. Place the main package file as /app/main.go. You may add additional .go files or subpackages under /app/, but do not add a vendor directory.
All .go files (except anything under a vendor directory) must be formatted with the official Go formatter so that no file shows as unformatted. Use the standard gofmt tool (or your editor's equivalent) to format your code before submission.
The program should be valid Go code and compile with go build. It should run without requiring stdin; it may print a short message (for example "Hello, world!") to stdout.
Expected inputs and outputs
Inputs: none required at runtime.
Output: the program can print a short message (e.g., "Hello, world!"), but the automated check only enforces source formatting and valid Go source files — it will fail if any .go file under the project is not formatted according to gofmt.
File locations and naming
Place your solution files under /app/.
At minimum include /app/main.go. Additional packages are allowed under /app/ subdirectories.
Do not create a vendor directory under /app/ (files under vendor are ignored by the check).
Hints
Before submitting, run the standard Go formatter on your files so they conform to Go formatting conventions. This will ensure the automated verifier accepts your source layout.
Tests
The following test script will be used to verify your solution:
bash
#!/bin/bash
if test $(find . -name "*.go" -not -path "*/vendor/*" -print0 | xargs -n 1 -0 gofmt -s -l | wc -l) -ne 0 ; then
echo Error: source files are not formatted according to recommendations. Run \"gofmt -s -w\" on:
find . -name "*.go" -not -path "*/vendor/*" -print0 | xargs -n 1 -0 gofmt -s -l
exit 1
fi
exit 0