Comments (6)
The code below works fine to me:
func TestLab(t *testing.T) {
resp, err := http.Get("https://www.qq.com")
if err != nil {
log.Panic(err)
}
if err := gop.P(resp); err != nil {
log.Panic(err)
}
}
Even using the standard http lib, the output is huge to read, could you tell us why you want to print this kind of huge data structure?
from got.
打印这个结构可能无意义, 但我不小心把这段gop代码加入我的项目时。造成我的项目崩溃,这个最小案例是我真实项目截取出来的。我做了一番调查才发现是gop的问题 。我真实环境是用 _ = gop.P(resp)
我只是向你报告一下这个边缘案例。希望能调查造成这个的原因是什么,其他人打印别的这种类似结构体时。可能遇到崩溃问题。
from got.
了解了,我修复下
from got.
即使是 golang 都会报错,这里我们没有用 got,只用标准库函数都无法打印:
a := map[interface{}]interface{}{}
b := map[interface{}]interface{}{}
a[&b] = b
b[&a] = a
fmt.Printf("%v", a)
from got.
那本质就是map循环引用导致无限循环是吧 。找出原因就行。
from got.
已经修正了呀,你没看懂 got 最新版不会有这个问题了吗
from got.
Related Issues (14)
- Use html to report value diff
- Add vscode quick testing commands
- How to use got with testify suite
- Compare gop with litter
- You'd better specify the minimum version it depends on HOT 1
- Improve the words sequence for lines HOT 11
- Implement histogram or patience diff algorithm
- Bug report: diff formating of string will check the text including text generated by gop format(like style text and comment), and it will appear incorrectly. HOT 8
- Compare got with other libs
- Mock code generation cli tool
- Basic usage of got
- tokenize panics when comparing array with Gt() HOT 1
- 我已经是第四次找不到gop这个库了 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from got.