Update goimports
This commit is contained in:
parent
f4022536e6
commit
e0253e45f3
6
Makefile
6
Makefile
|
@ -1,5 +1,7 @@
|
|||
.DEFAULT_GOAL := help
|
||||
|
||||
SOURCES := $(shell find . -path ./vendor -prune -o -name "*.go" -not -name '*_test.go' -print)
|
||||
|
||||
.PHONY: setup
|
||||
setup: ## Setup for required tools.
|
||||
go get -u golang.org/x/lint/golint
|
||||
|
@ -9,8 +11,8 @@ setup: ## Setup for required tools.
|
|||
dep ensure
|
||||
|
||||
.PHONY: fmt
|
||||
fmt: ## Formatting source codes.
|
||||
@goimports -w $(find . -type f -name '*.go' -not -path "./vendor/*")
|
||||
fmt: $(SOURCES) ## Formatting source codes.
|
||||
@goimports -w $^
|
||||
|
||||
.PHONY: lint
|
||||
lint: ## Run golint and go vet.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
)
|
||||
|
||||
func executor(t string) {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
)
|
||||
|
||||
type RequestContext struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
)
|
||||
|
||||
var LivePrefixState struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
)
|
||||
|
||||
func executor(in string) {
|
||||
|
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
)
|
||||
|
||||
func completer(in prompt.Document) []prompt.Suggest {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
"github.com/c-bata/go-prompt/completer"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
"github.com/pkg/term/termios"
|
||||
)
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
"github.com/c-bata/go-prompt"
|
||||
prompt "github.com/c-bata/go-prompt"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
runewidth "github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/mattn/go-runewidth"
|
||||
runewidth "github.com/mattn/go-runewidth"
|
||||
)
|
||||
|
||||
// Document has text displayed in terminal and cursor position.
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"unicode/utf8"
|
||||
"unsafe"
|
||||
|
||||
"github.com/mattn/go-tty"
|
||||
tty "github.com/mattn/go-tty"
|
||||
)
|
||||
|
||||
const maxReadBytes = 1024
|
||||
|
|
|
@ -5,7 +5,7 @@ package prompt
|
|||
import (
|
||||
"io"
|
||||
|
||||
"github.com/mattn/go-colorable"
|
||||
colorable "github.com/mattn/go-colorable"
|
||||
)
|
||||
|
||||
// WindowsWriter is a ConsoleWriter implementation for Win32 console.
|
||||
|
|
Loading…
Reference in New Issue