go-tool

command module
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-tool

                                                               tttt                                            lllllll 
                                                            ttt:::t                                            l:::::l 
                                                            t:::::t                                            l:::::l 
                                                            t:::::t                                            l:::::l 
   ggggggggg   ggggg   ooooooooooo                    ttttttt:::::ttttttt       ooooooooooo      ooooooooooo    l::::l 
  g:::::::::ggg::::g oo:::::::::::oo                  t:::::::::::::::::t     oo:::::::::::oo  oo:::::::::::oo  l::::l 
 g:::::::::::::::::go:::::::::::::::o                 t:::::::::::::::::t    o:::::::::::::::oo:::::::::::::::o l::::l 
g::::::ggggg::::::ggo:::::ooooo:::::o --------------- tttttt:::::::tttttt    o:::::ooooo:::::oo:::::ooooo:::::o l::::l 
g:::::g     g:::::g o::::o     o::::o -:::::::::::::-       t:::::t          o::::o     o::::oo::::o     o::::o l::::l 
g:::::g     g:::::g o::::o     o::::o ---------------       t:::::t          o::::o     o::::oo::::o     o::::o l::::l 
g:::::g     g:::::g o::::o     o::::o                       t:::::t          o::::o     o::::oo::::o     o::::o l::::l 
g::::::g    g:::::g o::::o     o::::o                       t:::::t    tttttto::::o     o::::oo::::o     o::::o l::::l 
g:::::::ggggg:::::g o:::::ooooo:::::o                       t::::::tttt:::::to:::::ooooo:::::oo:::::ooooo:::::ol::::::l
 g::::::::::::::::g o:::::::::::::::o                       tt::::::::::::::to:::::::::::::::oo:::::::::::::::ol::::::l
  gg::::::::::::::g  oo:::::::::::oo                          tt:::::::::::tt oo:::::::::::oo  oo:::::::::::oo l::::::l
    gggggggg::::::g    ooooooooooo                              ttttttttttt     ooooooooooo      ooooooooooo   llllllll
            g:::::g                                                                                                    
gggggg      g:::::g                                                                                                    
g:::::gg   gg:::::g                                                                                                    
 g::::::ggg:::::::g                                                                                                    
  gg:::::::::::::g                                                                                                     
    ggg::::::ggg                                                                                                       
       gggggg                                                                                                          

generate by http://patorjk.com/software/taag/#p=display&f=Doh&t=go-tool

📖 简介

Go Reference

Go Reference

工程规范

https://github.com/golang-standards/project-layout/blob/master/README_zh.md

编码规范

https://github.com/golang/go/wiki/CodeReviewComments

🚀 功能

debug
curl -v 'http://127.0.0.1:6060/debug/pprof/profile?seconds=30' > profile.tar.gz
curl -v 'http://127.0.0.1:6060/debug/pprof/heap?seconds=30' > head.tar.gz
curl -v 'http://127.0.0.1:6060/debug/pprof/goroutine?seconds=30' > goroutine.tar.gz

yum install -y graph
go tool pprof -http 0.0.0.0:9999 profile.tar.gz
go tool pprof -http 0.0.0.0:9999 head.tar.gz
go tool pprof -http 0.0.0.0:9999 goroutine.tar.gz

go tool pprof -http 0.0.0.0:9999 'http://127.0.0.1:6060/debug/pprof/profile?seconds=30'
go tool pprof -http 0.0.0.0:9999 'http://127.0.0.1:6060/debug/pprof/heap?seconds=30'
go tool pprof -http 0.0.0.0:9999 'http://127.0.0.1:6060/debug/pprof/goroutine?seconds=30'
  • debug=0 默认值,返回二进制的Protocol Buffers格式文件,这是go tool pprof工具期望的格式,适合用于后续的专业分析,但人类无法直接阅读
  • debug=1 纯文本格式,其中包含符号化的函数名、源文件路径和行号等信息,可以直接在浏览器中阅读,适合快速查看
  • debug=2 对于/debug/pprof/goroutine,此参数会以极高的可读性输出每个goroutine的完整状态和堆栈跟踪,格式类似于程序发生panic时的堆栈输出,非常适合深度调试goroutine泄漏或阻塞问题

💡 流程

🧰 安装

⚙️ 设置

🧲 效果

📚 链接

Documentation

Overview

Package main 应用程序

Directories

Path Synopsis
pkg
json
Package json
Package json
json/jsoniter
Package jsoniter
Package jsoniter
json/pbjson
Package pbjson
Package pbjson
lockfree/linkedlist
Package linkedlist 使用链表实现
Package linkedlist 使用链表实现
lockfree/ring
Package ring 实现了基于环形缓冲区的无锁队列 该实现通过维护序列号计数器解决ABA问题,提供高性能的并发消息传递机制
Package ring 实现了基于环形缓冲区的无锁队列 该实现通过维护序列号计数器解决ABA问题,提供高性能的并发消息传递机制
log
tool
git-tag command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL