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

标签 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

最佳答案

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

关于go - 如何使用godoc正确生成文档?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57068884/

相关文章:

node.js - 当您的处理程序函数退出时,aws-lambda 中的 goroutines 会发生什么?

go - 在 Go 中转换一片 slice ?

go - 在浏览器关闭时关闭 Go 服务器

arrays - 声明一个常量数组

regex - 为什么我的正则表达式在 Go 中总是失败?

go - 什么时候 go reflect CanInterface false?

go - 给定一个任意字符串,我怎样才能将命令输出到 bash?

golang channel 在接收值之前死锁

go - 变音符号和 slice

struct - 将结构分配给另一个结构