0
点赞
收藏
分享

微信扫一扫

hello go

有态度的萌狮子 2023-04-11 阅读 59


package main

import (
	"fmt"
	"os"
	"strings"
)

func main() {
	who := "World"
	if len(os.Args) > 1 {
		who = strings.Join(os.Args[1:], " ")
	}

	arr := []string{"a", "b", "c"}
	fmt.Println("Hello", who)
	fmt.Println("Hello", arr[1:])

}


E:\liteide\share\liteide\liteenv\1>1.exe 123
Hello 123
Hello [b c]

举报

相关推荐

0 条评论