This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"github.com/mholt/certmagic" | |
"log" | |
"os" | |
"os/exec" | |
"path/filepath" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this plugin creates a command `open_from_clipboard` that opens the path that's currently in the clipboard | |
# save this file at Packages/User/openclipboard.py | |
# then add the follow key binding if you like via the menu Preferences > Key Bindings - User | |
# { "keys": ["ctrl+shift+o"], "command": "open_from_clipboard" } | |
import sublime | |
import sublime_plugin | |
class OpenFromClipboardCommand(sublime_plugin.WindowCommand): | |
def run(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"on_save": [ | |
// automatically replay the current package on save | |
// for main packages, it compiles it and runs the command with the args passed to `replay` | |
// for normal packages, it compiles it and runs `go test` | |
{ | |
"cmd": "gs9o_open", | |
"args": { | |
"focus_view": false, // prevent 9o from stealing focus | |
"run": ["replay"] // "run" is a list of strings ["cmd", "arg1", "arg2"], | |
// it can be any command you can type into 9o |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// margo will die if more than 300m memory is used (default is 1000) | |
"margo_oom": 300, | |
// don't exclude any linters (enabled gstypes(go/types) linter, although it's buggy) | |
"lint_filter": [], | |
// turn calltip-as-you-type on | |
"autocomplete_live_hint": true, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"keys": ["ctrl+b"], | |
"command": "gs9o_open", | |
"args": {"run": ["[command here]"]}, | |
"context": [{ "key": "selector", "operator": "equal", "operand": "source.go" }] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PACKAGE | |
package runtime | |
import "runtime" | |
Package runtime contains operations that interact with Go's runtime | |
system, such as functions to control goroutines. It also includes the | |
low-level type information used by the reflect package; see reflect's | |
documentation for the programmable interface to the run-time type | |
system. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"bytes" | |
"flag" | |
"fmt" | |
"github.com/drio/drio.go/common/files" | |
"io" | |
"log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"go/ast" | |
"go/parser" | |
"go/token" | |
"strings" | |
) | |
type ImportDecl struct { |