tj / vscode-snippets Goto Github PK
View Code? Open in Web Editor NEWPersonal VSCode snippets for Go, JS, Elm, etc.
Personal VSCode snippets for Go, JS, Elm, etc.
Altho people gossip that you left nodejs, maybe there are somethings left for js
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{
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.