init
This commit is contained in:
commit
f7443bbab9
30 changed files with 271 additions and 0 deletions
BIN
echov2/echo
Executable file
BIN
echov2/echo
Executable file
Binary file not shown.
19
echov2/echo.go
Normal file
19
echov2/echo.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
// 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)
|
||||
}
|
||||
}
|
0
echov2/echo.go~
Normal file
0
echov2/echo.go~
Normal file
Reference in a new issue