Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
ast.Inspect(file, func(n ast.Node) bool {
// Find Function Call Statements
funcCall, ok := n.(*ast.CallExpr)
if ok {
fmt.Println(funcCall.Fun)
}
return true
})
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
@csthompson
csthompson / publisher.go
Last active September 11, 2020 22:57
NATS Publisher
package main
import (
"log"
"time"
nats "github.com/nats-io/nats.go"
)
type Msg struct {
= Create nodes and relationships =
// console
Create a node for the actor Tom Hanks:
[source,cypher]
----
CREATE (n:Actor {name:"Tom Hanks"});
----
@csthompson
csthompson / new_gist_file
Created October 16, 2013 21:51
Database URL
http://americanart.si.edu/collections/search/artwork/results/index.cfm?rows=10&fq=online_media_type:%22Images%22&q=&page=3&start=20&x=30&y=6
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{fancybox}
\usetikzlibrary{calc,shapes.multipart,chains,arrows}
\begin{document}
\section{Input}
\begin{tikzpicture}
[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, >=stealth, start chain]