Go-- error summary

Foreword

Time front-end time to read through some of the basic content Go, followed by learning to record some errors.

error

cannot refer to unexported name fmt.println

Given the information as follows:

# basic
.\main.go:6:2: cannot refer to unexported name fmt.println    //不能够引用未导出的名称fmt.println
.\main.go:6:2: undefined: fmt.println    //未定义的:fmt.println

the reason:

The reason ah, Go in fact, there is provided a function module to be exported must be capitalized, so the error is fmt.Println()writtenfmt.println()

Guess you like

Origin www.cnblogs.com/wangyang0210/p/11202200.html