From 6b484f5e1b69856cddc1cba161531cc2e61f45c6 Mon Sep 17 00:00:00 2001 From: Igor V Belousov Date: Tue, 8 Jun 2021 20:41:19 +0300 Subject: [PATCH] Chapter 1 - stings join --- ch1/echo3.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ch1/echo3.go diff --git a/ch1/echo3.go b/ch1/echo3.go new file mode 100644 index 0000000..5b2d310 --- /dev/null +++ b/ch1/echo3.go @@ -0,0 +1,12 @@ +//Echo3 Выводит аргументы командной строки +package main + +import ( + "fmt" + "os" + "strings" +) + +func main() { + fmt.Println(strings.Join(os.Args[1:], "|")) +}