如何使用godoc正确生成文档?

时间:2019-07-17 05:10:56

标签: go

这是我的代码和终端窗口。我应该怎么做才能使其正常工作并返回功能说明?

// Copyright DOCUMENTATION FOR ME. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package testDoc

// sayHello return "Hello world string"
func sayHello() string{
    return "Hello world!"
}

terminal return

1 个答案:

答案 0 :(得分:1)

使用-u标志显示unexported符号:go doc -u ./test

相关问题