回复了 jikai507 创建的主题: 请问Golang中如何定义常量数组


package main

import (

func main() {
    var list = []string{"str1", "str2", "str3", "str4"}

回复了 inmath 创建的主题: fmt.Println与println有什么区别

func println(args ...Type) The println built-in function formats its arguments in an implementation- specific way and writes the result to standard error. Spaces are always added between arguments and a newline is appended. Println is useful for bootstrapping and debugging; it is not guaranteed to stay in the language.

func Println(a ...interface{}) (n int, err error) Println formats using the default formats for its operands and writes to standard output. Spaces are always added between operands and a newline is appended. It returns the number of bytes written and any write error encountered.