2019-10-30 19:41:13 +03:00

47 lines
1.1 KiB
Go

// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
// For more tutorials : https://learngoprogramming.com
// In-person training : https://www.linkedin.com/in/inancgumus/
// Follow me on twitter: https://twitter.com/inancgumus
package main
import "fmt"
// ---------------------------------------------------------
// EXERCISE: Raw Concat
//
// 1. Initialize the name variable
// by getting input from the command line
//
// 2. Use concatenation operator to concatenate it
// with the raw string literal below
//
// NOTE
// You should concatenate the name variable in the correct
// place.
//
// EXPECTED OUTPUT
// Let's say that you run the program like this:
// go run main.go inanç
//
// Then it should output this:
// hi inanç!
// how are you?
// ---------------------------------------------------------
func main() {
// uncomment the code below
// name := "and get the name from the command-line"
// replace and concatenate the `name` variable
// after `hi ` below
msg := `hi CONCATENATE-NAME-VARIABLE-HERE!
how are you?`
fmt.Println(msg)
}