mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-22 20:34:26 +00:00
Add go fmt
to check format of code
This commit is contained in:
parent
161d29b0b9
commit
6a43836f0b
@ -12,11 +12,11 @@ import (
|
|||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
|
||||||
"os"
|
|
||||||
"time"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func bindataRead(data []byte, name string) ([]byte, error) {
|
func bindataRead(data []byte, name string) ([]byte, error) {
|
||||||
@ -149,7 +149,7 @@ func Asset(name string) ([]byte, error) {
|
|||||||
// It simplifies safe initialization of global variables.
|
// It simplifies safe initialization of global variables.
|
||||||
func MustAsset(name string) []byte {
|
func MustAsset(name string) []byte {
|
||||||
a, err := Asset(name)
|
a, err := Asset(name)
|
||||||
if (err != nil) {
|
if err != nil {
|
||||||
panic("asset: Asset(" + name + "): " + err.Error())
|
panic("asset: Asset(" + name + "): " + err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -226,14 +226,12 @@ type bintree struct {
|
|||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*bintree
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
|
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"bindata": &bintree{nil, map[string]*bintree{
|
"bindata": &bintree{nil, map[string]*bintree{
|
||||||
"gotty.js": &bintree{bindataGottyJs, map[string]*bintree{
|
"gotty.js": &bintree{bindataGottyJs, map[string]*bintree{}},
|
||||||
}},
|
"hterm.js": &bintree{bindataHtermJs, map[string]*bintree{}},
|
||||||
"hterm.js": &bintree{bindataHtermJs, map[string]*bintree{
|
"index.html": &bintree{bindataIndexHtml, map[string]*bintree{}},
|
||||||
}},
|
|
||||||
"index.html": &bintree{bindataIndexHtml, map[string]*bintree{
|
|
||||||
}},
|
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@ -283,4 +281,3 @@ func _filePath(dir, name string) string {
|
|||||||
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
cannonicalName := strings.Replace(name, "\\", "/", -1)
|
||||||
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ build:
|
|||||||
code: |
|
code: |
|
||||||
go get github.com/tools/godep
|
go get github.com/tools/godep
|
||||||
godep restore
|
godep restore
|
||||||
|
- script:
|
||||||
|
name: check format
|
||||||
|
code: |
|
||||||
|
if [ `go fmt ./... | wc -l` -gt 0 ]; then echo "go fmt error"; exit 1; fi
|
||||||
- tcnksm/gox:
|
- tcnksm/gox:
|
||||||
os: "darwin linux"
|
os: "darwin linux"
|
||||||
arch: "amd64"
|
arch: "amd64"
|
||||||
|
Loading…
Reference in New Issue
Block a user