Skip to content

Instantly share code, notes, and snippets.

View baojiliu's full-sized avatar
🌴
On vacation

baojiliu

🌴
On vacation
View GitHub Profile
i
me
my
myself
we
our
ours
ourselves
you
your
@okunishinishi
okunishinishi / Remove all git tags
Created March 8, 2014 03:12
Delete all git remote tags
#Delete local tags.
git tag -l | xargs git tag -d
#Fetch remote tags.
git fetch
#Delete remote tags.
git tag -l | xargs -n 1 git push --delete origin
#Delete local tasg.
git tag -l | xargs git tag -d
@josephspurrier
josephspurrier / addimport.go
Last active October 28, 2022 14:34
Add Import using ast in Go
// Source: https://gitlab.pro/googlesource/tools/blob/ae534bcb6ccdd13487d0491c2194d10ebcd30ff3/astutil/imports.go
// Source: https://golang.org/src/go/doc/example.go#L262
package main
import (
"bytes"
"fmt"
"go/ast"
"go/parser"