<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ## 一、 Go 代碼中經常使用到的 25 個關鍵字或保留字 | 關鍵字 | 說明 | | --- | --- | | break | | | default | | | func | | | interface | | |select | | | case | | | defer | | | go | | | map | | | struct | | | chan | | | else | | | goto | | | package | | | switch | | | const | | | fallthrough | | | if | | | range | | | type | | | continue | | | for | | | import | | | return | | | var | | ## 二、Go 語言的 36 個預定義標識符 | 標識符 | 說明 | | --- | --- | | append | | | bool | | | byte | | | cap | | | close | | | complex | | | complex64 | | | complex128 | | | uint16 | | | copy | | | false | | | float32 | | | float64 | | | imag | | | int | | | int8 | | | int16 | | | uint32 | | | int32 | | | int64 | | | iota | | | len | | | make | | | new | | | nil | | | panic | | | uint64 | | | print | | | println | | | real | | | recover | | | string | | | true | | | uint | | | uint8 | | | uintptr | | ## 三、格式化符號 | 格 ?式 | 描 ?述 | | --- | --- | | %v | 按值的本來值輸出 | | %+v | 在 %v?基礎上,對結構體字段名和值進行展開 | | %#v | 輸出 Go 語言語法格式的值 | | %T | 輸出 Go 語言語法格式的類型和值 | | %% | 輸出 %?本體 | | %b | 整型以二進制方式顯示 | | %o | 整型以八進制方式顯示 | | %d | 整型以十進制方式顯示 | | %x | 整型以十六進制方式顯示 | | %X | 整型以十六進制、字母大寫方式顯示 | | %U | Unicode?字符 | | %f | 浮點數 | | %p | 指針,十六進制方式顯示 | #### 實例 ~~~ package main import ( "fmt" "os" ) type point struct { x, y int } func main() { p := point{1, 2} fmt.Printf("%v\n", p) fmt.Printf("%+v\n", p) fmt.Printf("%#v\n", p) fmt.Printf("%T\n", p) fmt.Printf("%t\n", true) fmt.Printf("%d\n", 123) fmt.Printf("%b\n", 14) fmt.Printf("%c\n", 33) fmt.Printf("%x\n", 456) fmt.Printf("%f\n", 78.9) fmt.Printf("%e\n", 123400000.0) fmt.Printf("%E\n", 123400000.0) fmt.Printf("%s\n", "\"string\"") fmt.Printf("%q\n", "\"string\"") fmt.Printf("%x\n", "hex this") fmt.Printf("%p\n", &p) fmt.Printf("|%6d|%6d|\n", 12, 345) fmt.Printf("|%6.2f|%6.2f|\n", 1.2, 3.45) fmt.Printf("|%-6.2f|%-6.2f|\n", 1.2, 3.45) fmt.Printf("|%6s|%6s|\n", "foo", "b") fmt.Printf("|%-6s|%-6s|\n", "foo", "b") s := fmt.Sprintf("a %s", "string") fmt.Println(s) fmt.Fprintf(os.Stderr, "an %s\n", "error") } ~~~ 執行結果: ``` {1 2} {x:1 y:2} main.point{x:1, y:2} main.point true 123 1110 ! 1c8 78.900000 1.234000e+08 1.234000E+08 "string" "\"string\"" 6865782074686973 0xc0000aa070 | 12| 345| | 1.20| 3.45| |1.20 |3.45 | | foo| b| |foo |b | a string an error ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看