Skip to content

build.sh #34

@Firaani321

Description

@Firaani321

Gap:
No validation that go is installed on the system.
No option to handle additional build arguments (e.g. debug or release mode).

I'm a newbie dev but I have a suggestion to add to this:
#!/bin/bash

Check if Go is installed

if ! command -v go &>/dev/null; then
echo "Go is not installed. Please install Go to proceed."
exit 1
fi

echo "Building the sample program..."
go build -o sample sample.go

if [ $? -eq 0 ]; then
echo "Build successful."
else
echo "Build failed."
exit 1
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions