{"repo":"ryboe/q","free":true,"listed":false,"github":"https://github.com/ryboe/q","clone":"git clone https://github.com/ryboe/q.git","description":"Quick and dirty debugging output for tired Go programmers","language":"Go","stars":1546,"topics":["go","golang","debugger"],"license":"MIT","category":"dev-tools","readme_excerpt":"q q is a better way to do print statement debugging. Type q.Q instead of fmt.Printf and your variables will be printed like this: Why is this better than fmt.Printf ? Faster to type Pretty-printed vars and expressions Easier to see inside structs Doesn't go to noisy-ass stdout. It goes to $TMPDIR/q . Pretty colors! Basic Usage For best results, dedicate a terminal to tailing $TMPDIR/q while you work. Install Put these functions in your shell config. Typing qq or rmqq will then start tailing $TMPDIR/q . You also can simply tail -f $TMPDIR/q , but it's highly recommended to use the above commands. Editor Integration VS Code Preferences User Snippets Go Sublime Text Tools Developer New Snippet Atom Atom Open Your Snippets JetBrains GoLand Settings Editor Live Templates In Go , add a new template with: Abbreviation: qq Description: Pretty-print to $TMPDIR/q Template text: q.Q($END$) // DEBUG Applicable in: select the Go scope Emacs Add a new snippet file to the go-mode snippets directory ( $HOME/.emacs.d/snippets/go-mode/qq ). This should contain: Vim/NeoVim For SirVer/ultisnips, use :UltiSnipsEdit to add the new snippet: Haven't I seen this somewhere before? Python programmers will recognize this as a Golang port of the q module by zestyping. Ping does a great job of explaining q in his awesome lightning talk from PyCon 2013. Watch it! It's funny :) FAQ Why q.Q ? It's quick to type and unlikely to cause naming collisions. Is q.Q() safe for concurrent use? Yes.","default_branch":null,"files":null,"tree":[],"storefront":"/r/ryboe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ryboe/q/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}