zoukankan      html  css  js  c++  java
  • gopl

    go get -v golang.org/x/tools/cmd/goimports   // timeout
    1149 # 启用 Go Modules 功能
    1150 export GO111MODULE=on
    1151 # 配置 GOPROXY 环境变量
    export GO111MODULE=on
    export GOPROXY=https://goproxy.io
    // go option test
    推荐:blog: Go工具和调试详解
    // Copyright © 2016 Alan A. A. Donovan & Brian W. Kernighan.
    // License: https://creativecommons.org/licenses/by-nc-sa/4.0/
    
    // See page 1.
    
    // Helloworld is our first Go program.
    //!+
    package main
    
    import "fmt"
    
    var len = 10
    var (
        n1 = 1
        n2 = 2
    )
    func main() {
        fmt.Println("Hello, 世界")
        // single var
        var i int
        // i = 1.1 // constant 1.1 truncated to integer go 
        fmt.Println("i =", i)
        var j = 10
        fmt.Println("j =", j)
        k := 10
        fmt.Println("k =", k)
    
        // multi var
        var n1, n2, n3 int
        fmt.Println("n1 =", n1, "n2 =", n2, "n3 =", n3)
        m1, m2, m3 := 100, "tom", 999
        fmt.Println("m1 =", m1, "m2 =", m2, "m3 =", m3)
    
        var len = 20
        fmt.Println("len =", len)
        fmt.Printf("len`s type is %T", len)  // show type
    }
    
    //!-
  • 相关阅读:
    codevs 1450 xth 的旅行
    Loj #6287 诗歌
    Codeforces 323C Two permutations
    Spoj MKTHNUM
    [TJOI2015]弦论
    Spoj SUBLEX
    bzoj 4338: BJOI2015 糖果
    bzoj 3462: DZY Loves Math II
    bzoj 2843: 极地旅行社
    清北学堂模拟赛d4t5 b
  • 原文地址:https://www.cnblogs.com/cjyp/p/13687593.html
Copyright © 2011-2022 走看看