Skip to content

Instantly share code, notes, and snippets.

View main.go
package main
import (
"encoding/json"
"fmt"
"log"
"os"
"github.com/podhmo/gengen/enum"
"github.com/podhmo/gengen/enum/internal/sandbox"
View main.go
package main
import (
"fmt"
"io/fs"
"log"
"os"
"strings"
)
View main.go
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/printer"
"go/token"
"log"
"os"
View about-go.md

goでいつ何を使うか?

  • global変数とinit()

    • toolやmiddlewareでは活躍。それ以外では避けるべき。micro serviceを徹底していた場合にはsmall web applicationでも大丈夫かもしれない。
    • 環境変数等によって処理をちょっとだけ分岐したり、デフォルト値を変更したり程度はできる
    • 大きめのapplicationでは必ず負債になる
  • 高階関数

View keybindings.json
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+x shift+l",
"command": "emacs-mcx.transformToLowercase",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+x ctrl+l",
"command": "-emacs-mcx.transformToLowercase",
View alacritty.yml
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will