This repository has been archived on 2024-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
go-book/echov2/echo.go

20 lines
252 B
Go
Raw Normal View History

2024-08-13 20:31:39 +02:00
// Echov2 prints its command-line arguments.
package main
import (
"fmt"
"os"
)
func main() {
s, sep := "", ""
for _, arg := range os.Args[1:] {
s += sep + arg
sep = " "
}
fmt.Println(s)
for i, v := range os.Args[1:] {
println(i,v)
}
}