Skip to content

devlights/try-golang

Repository files navigation

try-golang

This is my TUTORIAL project for golang.

try-golang - Go Version Go

Open in Gitpod

Go version

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

$ go version
go version go1.23.0 linux/amd64

$ task build
task: [build] go build .

$ ./try-golang -help
Usage of ./try-golang:
  -example string
        name of example
  -list
        show all example names
  -onetime
        run only one time
  -vscode
        run with vscode

Run

$ go run ./cmd/try-golang

If you want to use go-task, type the following command.

$ go install github.com/go-task/task/v3/cmd/task@latest

Once the above command is complete, you can run it at

$ task run

Test

$ go test -v ./...

or

$ task test

関連リポジトリ