/go-learning

This repository contains my progress (re-)studying Go programming language based on "The Go Programming Language" book, written by Alan A. A. Donovan and Brian W. Kernighan

Primary LanguageGoMIT LicenseMIT

go-learning

GitHub go.mod Go version of a Go module GoDoc reference example GoReportCard example GitHub license

This repository contains my progress (re-)studying Go programming language based on "The Go Programming Language" book, written by Alan A. A. Donovan and Brian W. Kernighan (gopl.io).

CMD Application

The cmd app executes functions supported by chsutil package.

How to run it locally (Docker)

docker pull silvanoneto/go-learning-cmd:develop
docker run --rm silvanoneto/go-learning-cmd:develop

A command example that set a function and file names as parameters:

docker run --rm go-learning-cmd:develop /bin/sh -c "./go-learning -name chapter01.Exercise04 examples/data/01_03_dup_file1.txt examples/data/01_03_dup_file2.txt"

How to run it locally (Manual)

You'll need to install Go in your machine. Follow the instructions in https://golang.org/doc/install or use the package manager of your preference.

After this:

  1. Download the source code;
  2. Open your terminal/prompt within the project folder path;
  3. Run the following commands:
go mod download
go run cmd/go_learning.go

If you want to set the function to run and other parameters, follow the example:

go run cmd/go_learning.go -name chapter01.Exercise04 examples/data/01_03_dup_file1.txt examples/data/01_03_dup_file2.txt