galaxyzen

Results 5 comments of galaxyzen

> @codevvvv9 > > @walkmiao > > > @geektutu > > > > @walkmiao > > > > 正确的调用顺序应该是Header().Set 然后WriteHeader() 最后是Write() > > > > > > 感谢指出,在 `WriteHeader()` 后调用...

``` func (c *Context) Render(code int, r render.Render) { c.Status(code) if !bodyAllowedForStatus(code) { r.WriteContentType(c.Writer) c.Writer.WriteHeaderNow() return } if err := r.Render(c.Writer); err != nil { panic(err) } } ``` 我发现gin中的`*Context.JSON`方法会调用`*Context.Render`方法,而此方法会最先调用`WriteHeader`方法,在整个调用链最后才会设置Content-Type...

I got it. Type `com.github.johnfactotum.Foliate` instead of `foliate` in the terminal. But I meet a new issue: There is no GUI environment on my Ubuntu20.04(WSL2). So how can I start...

```go package main //go:noinline func add(a, b int32) (int32, bool) { return a + b, true } func main() { add(10, 32) } ``` 版本:go1.16.15 amd64 `go1.16.15 tool compile -S...

看了一圈`go:linkname`的解释,还是鸟窝讲的明白。正好看到专栏中`sync.Mutex`的实现,疑惑信号量的实现为什么在`runtime`中。