1_hello_world

command
v0.0.0-...-94bc61e Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 1 Imported by: 0

README

Hello World

As the first step for Golang learning, a hello world application is expected.

The needed files for this project are a Dockerfile and a simple golang sample.

How to run

You can build the application on local or either use docker to ease the process. Here, we will only cover the Dockerfile-through process.

Place yourself on the terminal, at the same level as this directory, and run:

docker build -t <simple project name> .
docker run <simple project name>

Reference Index

For this mini-project we need fmt package, which implements formatted I/O functions analogous to C's printf and scanf. The format 'verbs' are derived from C's but are simpler. This way we will handle output for our Hello World.

To import this package we simply do the following [Ref. 1]:

import "fmt"

We also use our main function for printing our text through the fmt.Println function [Ref. 2].

func main() {
	fmt.Println("Hello World!")
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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