go-learning

module
v0.0.0-...-7c24f4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2021 License: MIT

README

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

Directories

Path Synopsis
pkg
chapter01
Package chapter01 01_hello_world contains the code studied on section 01 Package chapter01 02_echo contains the code studied on section 02 Package chapter01 03_dup contains the code studied on section 03 Package chapter01 04_lissajous contains the code studied on section 04 Package chapter01 05_fetch contains the code studied on section 05 Package chapter01 06_fetchall contains the code studied on section 06 Package chapter01 07_server contains the code studied on section 07
Package chapter01 01_hello_world contains the code studied on section 01 Package chapter01 02_echo contains the code studied on section 02 Package chapter01 03_dup contains the code studied on section 03 Package chapter01 04_lissajous contains the code studied on section 04 Package chapter01 05_fetch contains the code studied on section 05 Package chapter01 06_fetchall contains the code studied on section 06 Package chapter01 07_server contains the code studied on section 07
chsutil
Package chsutil functions has facilities to call chapters functions
Package chsutil functions has facilities to call chapters functions
util
Package util time_tracker has facilities to track the execution time
Package util time_tracker has facilities to track the execution time

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL