Open xgqfrms opened 5 years ago
go.go
// paramsInput params.
type paramsInput struct {
}
// paramsOutput params.
type paramsOutput struct {
}
// string-enum .
type string-enum string
// string-enums available.
const (
)
db *sqlx.DB
if v, ok := ; ok {
}
// Option function.
type Option func(*options)
// New with the given options.
func New(options ...Option) *options {
var v options
for _, o := range options {
o(&v)
}
return &v
}
// Witho .
func Witho() Option {
return func() {
}
}
logs.WithError(err).Error("le")
logs.Info("li")
logs.WithFields(log.Fields{
})
delete(, "")
pretty.Print()
fmt.Printf("%#v\n", )
log.Printf("%v\n", )
log.Fatalf("error: %s\n", err)
= append(, )
// +build js
js.Value
// TODO:
float64()
// implementation.
func ( *) () {
}
// implementation.
func ( ) () {
}
// implementation.
func ( *) () {
return
}
fmt.Sprintf("", )
if err != nil {
}
if err := ; err != nil {
}
errors.Wrap(err, "")
return
return err
return nil
time.Duration()
t testing.TB
time.Now()
start := time.Now()
time.Since(start)
assert.Equal(t, expected, actual)
assert.EqualError(t, err, `msg`)
assert.NoError(t, err, "")
map[string]value
http.Error(w, "", http.Status)
w http.ResponseWriter, r *http.Request
fmt.Printf("%s\n", hex.Dump())
`:""`
[]byte()
func main(){
}
func init(){
}
// .
func () {
}
// .
type struct {
}
func () {
}
// Name .
Name string
ctx context.Context
context.Background()
{
b, err := ioutil.ReadAll()
if err != nil {
panic(err)
}
fmt.Printf("%s\n", hex.Dump(b))
}
// .
type interface {
}
.Lock()
defer .Unlock()
// New .
func New() * {
return &{
}
}
{
enc := json.NewEncoder(os.Stderr)
enc.SetIndent("", " ")
enc.Encode()
}
for _, v := range value {
}
// Config options.
type Config struct {
}
//
type struct {
Config
}
// New with the given config.
func New(c Config) * {
return &{
Config: c,
}
}
// Benchmark .
func Benchmark(b *testing.B) {
for i := 0; i < b.N; i++ {
}
}
// Test .
func Test(t *testing.T) {
}
t.Run("", func(t *testing.T){
})
vdom.Attributes{
}
vscode-snippets & go.json
https://github.com/tj/vscode-snippets/blob/master/go.json