[18] Results

Golang : Fix fmt.Scanf() on Windows will scan input twice problem

golang fmt-scanf-bug windows scan-input-twice

If you ever need to write a program that use Golang's fmt.Scanf() function on Windows operating system and test the….... read more

Golang : Get ASCII code from a key press(cross-platform) example

golang keyboard input ascii


Somehow you are feeling nostalgic and played some retro games from the 80s such as Load Runner.... read more

Golang : File system scanning

golang filepath-walk scan size

Problem :

How to scan all the files located inside a root directory in Golang?

Solution :

Use the filepath.Walk.... read more

Golang : How to pipe input data to executing child process?

golang input-pipe input-data os-exec

Problem :

Your program is executing a child process via os/exec and you want to pipe input data to the….... read more

Golang : How to read float value from standard input ?

golang read-integer standard-input

This is a continuation from previous tutorial on how to read integer value from standard input. For this tutorial, we….... read more

Golang : Variadic function arguments sanity check example

golang variadic input-parameter


Golang is cool and you love to use variadic function frequently. You have a variadic function such as a….... read more

Golang : Number guessing game with user input verification example

golang number-guessing integer input-verification

Helping a Golang student from Mexico. She is building a simple random number guessing game and she wants to know….... read more

Golang : Accept input from user with fmt.Scanf skipped white spaces and how to fix it

golang accept-input scanf whitespace bufio-readstring

Problem :

Your program accepts user input from console(terminal). It was working fine if the user input is in one….... read more