英文: How to read specific line of file? 问题 我需要读取文件的特定行。我已经阅读了一些相关的主题:https://stackoverflow.com/questi...
Golang – 如何使单个结构体与多个结构体一起工作?
英文: Golang - How to make single struct works together with multiple structs? 问题 我想让单个结构与多个结构一起工作。 在下...
确定POST数据值是否与结构字段类型匹配
英文: Determine if POST data value matches struct field type 问题 使用gin框架,我正在尝试确定POST的数据是否与结构字段类型不匹配,并通知...
在Go语言中进行光标键终端输入
英文: Cursor key terminal input in Go 问题 我正在为终端创建一个Go应用程序。以下代码要求用户在终端输入文本。 package main import ( "...
如何在Golang的单元测试中测试net.Conn?
英文: How does one test net.Conn in unit tests in Golang? 问题 我目前正在研究如何为Go语言中的net.Conn接口创建一些单元测试,以及构建在该...
如何测试包含log.Fatal()的Go函数
英文: How to test Go function containing log.Fatal() 问题 以下是要翻译的内容: 假设我有以下打印一些日志消息的代码。我该如何测试是否已正确记录了这些消...
Go reflect. How to check whether reflect.Type is an error type?
英文: Go reflect. How to check whether reflect.Type is an error type? 问题 我需要确定地检查一个 reflect.Type 是否是一个...
Golang将嵌套的JSON解码为嵌套的结构体
英文: Golang Decode Nested JSON into Nested Struct 问题 让我们来看一下以下的代码片段: type Input struct { Value1 strin...
go程序抛出错误,找不到包”code.google.com/p/go.net/websocket”。
英文: go program throwing error cannot find package "code.google.com/p/go.net/websocket" 问题 ...
Web应用程序中的Go身份验证逻辑模式
英文: Go- authentication logic pattern in web app 问题 我想确定一个在使用golang编写的Web应用程序中用于用户身份验证的简单而有用的模式。 我想到了...
11727

