×

Go语言一千问

hqy hqy 发表于2025-11-11 23:01:12 浏览10 评论0

抢沙发发表评论

解答

  1. https://kinber.cn/post/5888.html

  2. code,repo in github <git@github.com:yiGmMk/golang-1000-question.git>

  3. 代码允许环境:

    • go version go1.15.3 linux/amd64

const

  1. [001]iota,有常量如下,second数值是?

    1
    2
    3
    4
    5
    6
    const (
       first = 1
       second =iota
       third
       fourth
    )

string

  1. [002]strings.ReplaceAll,代码如下,replace的值是?

    1
    2
    3
    4
    origin := "   特斯拉Model X    "
    replace := strings.ReplaceAll(origin, " ", "")

    fmt.Printf("origin:%s\nreplace:%s\n", origin, replace)


打赏

本文链接:https://kinber.cn/post/5889.html 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

 您阅读本篇文章共花了: 

群贤毕至

访客