英文: What is Go's equivalent to Python's crypt.crypt? 问题 我目前正在尝试使用《Violent Python》一书中的示例。您可以在...
在其他包中定义的类型的方法集能被修改吗?
英文: Can the method set of a type defined in other package be modified? 问题 内置的log和log.Logger没有像Python...
解析非“标准”格式的日期/时间字符串
英文: Parsing date/time strings which are not 'standard' formats 问题 如何在Go中解析非标准的日期/时间字符串?例如,如果...
在Go中,在HTML模板中显示计数。
英文: Display a count on html template in Go 问题 使用Go中的html/templates,您可以执行以下操作: <table class=&a...
如何使用反射通过名称获取包常量的值?
英文: How to get a package const value by name using reflect? 问题 这是一个包含一些常量的包。 package object type Lan...
使用Go解析Go时间戳
英文: Parse Go time stamp using Go 问题 Go使用time.Now().String()打印时间,结果可能是以下两种格式之一: 2012-12-18 06:09:18.6...
类似于getchar的函数
英文: function similar to getchar 问题 有没有类似于C语言中的getchar函数的Go函数可以处理控制台中的Tab键按下?我想在我的控制台应用程序中实现一些自动补全的功能...
Go代码在go test和go run中的行为不同。
英文: Go Code behaves differently in go test vs go run 问题 我在我的Ubuntu 12.04.1笔记本上运行go 1.0.3,并遇到了一个问题,即如...
从根目录提供主页和静态内容
英文: Serve homepage and static content from root 问题 在Golang中,我如何在根目录下提供静态内容,同时还有一个根目录处理程序用于提供主页。 使用以下...
在Go中的服务器,重定向到标准输出
英文: Server in Go, redirection to stdout 问题 如何在Go中实现一个服务器,将每个传入的行发送到标准输出? package main import ( "...
11727