英文: How to set window position and make it unresizable in Go walk 问题 我正在尝试弄清楚如何使用Go GUI库 walk 的基础知识。...
简化Go代码
英文: Simplifying Go Code 问题 我有两个函数如下所示,它们看起来很相似,但使用不同的函数来查询数据库。由于Go语言不鼓励方法重载,重复性是否可接受?或者应该将它们重构为一个函数?...
[Golang]两个goroutine之间的通信
英文: [Golang]communication between 2 goroutine 问题 为什么在这个脚本中,goroutine "shower" 不起作用? packag...
Go Golang to serve a specific html file
英文: Go Golang to serve a specific html file 问题 http.Handle("/", http.FileServer(http.Dir(&...
根据参数类型如何获取返回值?
英文: How I can get return value based on argument type? 问题 当我定义函数时,我必须设置参数和返回值的类型。我如何根据参数类型返回相应的值?例如:...
如何在Golang中更改客户端和代理之间的MQTT keepAlive(握手)间隔?
英文: How to change MQTT keepAlive(handshake) Interval between the client and the broker in Golang? 问题...
为什么这两个结构体不相等?
英文: why are those two structs not equal? 问题 我在Go语言中有一个结构体: type header struct { dataLength uint16 op...
How to write a safe rename in Go? (Or, how to write this Python in Go?)
英文: How to write a safe rename in Go? (Or, how to write this Python in Go?) 问题 我在Python中有以下代码: if no...
在Go语言中,如何判断文件是否存在或不存在呢?
英文: File both exists and not exists in Go? 问题 这个Go程序为什么既不说文件存在,也不说文件不存在呢?理论上应该是其中之一吧? package main i...
What does 1 << 32 mean in Go?
英文: What does 1 << 32 mean in Go? 问题 1 << 32 在Go语言中的含义是什么?如果我理解正确的话,它表示的是 2^32。或者我理解错了吗?...
11727