Skip to content

Commit

Permalink
Add static json file caching
Browse files Browse the repository at this point in the history
Avoid the call gocode during this condition

- Conditions
  - Hook the insert of dot(.)
  - Typed the package has not yet been imported use context['input']
  - Match the typed package name and json file name

Signed-off-by: Koichi Shiraishi <k@zchee.io>
  • Loading branch information
zchee committed Feb 9, 2016
1 parent de7b824 commit 7b05831
Show file tree
Hide file tree
Showing 147 changed files with 488 additions and 19 deletions.
1 change: 1 addition & 0 deletions data/json/adler32.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "Size", "type": ""}, {"class": "func", "name": "Checksum", "type": "func(data []byte) uint32"}, {"class": "func", "name": "New", "type": "func() hash.Hash32"}]]
1 change: 1 addition & 0 deletions data/json/aes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "BlockSize", "type": ""}, {"class": "func", "name": "NewCipher", "type": "func(key []byte) (cipher.Block, error)"}, {"class": "type", "name": "KeySizeError", "type": "int"}]]
1 change: 1 addition & 0 deletions data/json/ascii85.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "func", "name": "Decode", "type": "func(dst []byte, src []byte, flush bool) (ndst int, nsrc int, err error)"}, {"class": "func", "name": "Encode", "type": "func(dst []byte, src []byte) int"}, {"class": "func", "name": "MaxEncodedLen", "type": "func(n int) int"}, {"class": "func", "name": "NewDecoder", "type": "func(r io.Reader) io.Reader"}, {"class": "func", "name": "NewEncoder", "type": "func(w io.Writer) io.WriteCloser"}, {"class": "type", "name": "CorruptInputError", "type": "int64"}]]
1 change: 1 addition & 0 deletions data/json/asn1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "ClassApplication", "type": ""}, {"class": "const", "name": "ClassContextSpecific", "type": ""}, {"class": "const", "name": "ClassPrivate", "type": ""}, {"class": "const", "name": "ClassUniversal", "type": ""}, {"class": "const", "name": "TagBitString", "type": ""}, {"class": "const", "name": "TagBoolean", "type": ""}, {"class": "const", "name": "TagEnum", "type": ""}, {"class": "const", "name": "TagGeneralString", "type": ""}, {"class": "const", "name": "TagGeneralizedTime", "type": ""}, {"class": "const", "name": "TagIA5String", "type": ""}, {"class": "const", "name": "TagInteger", "type": ""}, {"class": "const", "name": "TagOID", "type": ""}, {"class": "const", "name": "TagOctetString", "type": ""}, {"class": "const", "name": "TagPrintableString", "type": ""}, {"class": "const", "name": "TagSequence", "type": ""}, {"class": "const", "name": "TagSet", "type": ""}, {"class": "const", "name": "TagT61String", "type": ""}, {"class": "const", "name": "TagUTCTime", "type": ""}, {"class": "const", "name": "TagUTF8String", "type": ""}, {"class": "func", "name": "Marshal", "type": "func(val interface{}) ([]byte, error)"}, {"class": "func", "name": "Unmarshal", "type": "func(b []byte, val interface{}) (rest []byte, err error)"}, {"class": "func", "name": "UnmarshalWithParams", "type": "func(b []byte, val interface{}, params string) (rest []byte, err error)"}, {"class": "type", "name": "BitString", "type": "struct"}, {"class": "type", "name": "Enumerated", "type": "int"}, {"class": "type", "name": "Flag", "type": "bool"}, {"class": "type", "name": "ObjectIdentifier", "type": "[]int"}, {"class": "type", "name": "RawContent", "type": "[]byte"}, {"class": "type", "name": "RawValue", "type": "struct"}, {"class": "type", "name": "StructuralError", "type": "struct"}, {"class": "type", "name": "SyntaxError", "type": "struct"}]]
1 change: 1 addition & 0 deletions data/json/ast.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "Bad", "type": ""}, {"class": "const", "name": "Con", "type": ""}, {"class": "const", "name": "FilterFuncDuplicates", "type": ""}, {"class": "const", "name": "FilterImportDuplicates", "type": ""}, {"class": "const", "name": "FilterUnassociatedComments", "type": ""}, {"class": "const", "name": "Fun", "type": ""}, {"class": "const", "name": "Lbl", "type": ""}, {"class": "const", "name": "Pkg", "type": ""}, {"class": "const", "name": "RECV", "type": ""}, {"class": "const", "name": "SEND", "type": ""}, {"class": "const", "name": "Typ", "type": ""}, {"class": "const", "name": "Var", "type": ""}, {"class": "func", "name": "FileExports", "type": "func(src *ast.File) bool"}, {"class": "func", "name": "FilterDecl", "type": "func(decl ast.Decl, f ast.Filter) bool"}, {"class": "func", "name": "FilterFile", "type": "func(src *ast.File, f ast.Filter) bool"}, {"class": "func", "name": "FilterPackage", "type": "func(pkg *ast.Package, f ast.Filter) bool"}, {"class": "func", "name": "Fprint", "type": "func(w io.Writer, fset *token.FileSet, x interface{}, f ast.FieldFilter) (err error)"}, {"class": "func", "name": "Inspect", "type": "func(node ast.Node, f func(ast.Node) bool)"}, {"class": "func", "name": "IsExported", "type": "func(name string) bool"}, {"class": "func", "name": "MergePackageFiles", "type": "func(pkg *ast.Package, mode ast.MergeMode) *ast.File"}, {"class": "func", "name": "NewCommentMap", "type": "func(fset *token.FileSet, node ast.Node, comments []*ast.CommentGroup) ast.CommentMap"}, {"class": "func", "name": "NewIdent", "type": "func(name string) *ast.Ident"}, {"class": "func", "name": "NewObj", "type": "func(kind ast.ObjKind, name string) *ast.Object"}, {"class": "func", "name": "NewPackage", "type": "func(fset *token.FileSet, files map[string]*ast.File, importer ast.Importer, universe *ast.Scope) (*ast.Package, error)"}, {"class": "func", "name": "NewScope", "type": "func(outer *ast.Scope) *ast.Scope"}, {"class": "func", "name": "NotNilFilter", "type": "func(_ string, v reflect.Value) bool"}, {"class": "func", "name": "PackageExports", "type": "func(pkg *ast.Package) bool"}, {"class": "func", "name": "Print", "type": "func(fset *token.FileSet, x interface{}) error"}, {"class": "func", "name": "SortImports", "type": "func(fset *token.FileSet, f *ast.File)"}, {"class": "func", "name": "Walk", "type": "func(v ast.Visitor, node ast.Node)"}, {"class": "type", "name": "ArrayType", "type": "struct"}, {"class": "type", "name": "AssignStmt", "type": "struct"}, {"class": "type", "name": "BadDecl", "type": "struct"}, {"class": "type", "name": "BadExpr", "type": "struct"}, {"class": "type", "name": "BadStmt", "type": "struct"}, {"class": "type", "name": "BasicLit", "type": "struct"}, {"class": "type", "name": "BinaryExpr", "type": "struct"}, {"class": "type", "name": "BlockStmt", "type": "struct"}, {"class": "type", "name": "BranchStmt", "type": "struct"}, {"class": "type", "name": "CallExpr", "type": "struct"}, {"class": "type", "name": "CaseClause", "type": "struct"}, {"class": "type", "name": "ChanDir", "type": "int"}, {"class": "type", "name": "ChanType", "type": "struct"}, {"class": "type", "name": "CommClause", "type": "struct"}, {"class": "type", "name": "Comment", "type": "struct"}, {"class": "type", "name": "CommentGroup", "type": "struct"}, {"class": "type", "name": "CommentMap", "type": "map[ast.Node][]*ast.CommentGroup"}, {"class": "type", "name": "CompositeLit", "type": "struct"}, {"class": "type", "name": "Decl", "type": "interface"}, {"class": "type", "name": "DeclStmt", "type": "struct"}, {"class": "type", "name": "DeferStmt", "type": "struct"}, {"class": "type", "name": "Ellipsis", "type": "struct"}, {"class": "type", "name": "EmptyStmt", "type": "struct"}, {"class": "type", "name": "Expr", "type": "interface"}, {"class": "type", "name": "ExprStmt", "type": "struct"}, {"class": "type", "name": "Field", "type": "struct"}, {"class": "type", "name": "FieldFilter", "type": "func(name string, value reflect.Value) bool"}, {"class": "type", "name": "FieldList", "type": "struct"}, {"class": "type", "name": "File", "type": "struct"}, {"class": "type", "name": "Filter", "type": "func(string) bool"}, {"class": "type", "name": "ForStmt", "type": "struct"}, {"class": "type", "name": "FuncDecl", "type": "struct"}, {"class": "type", "name": "FuncLit", "type": "struct"}, {"class": "type", "name": "FuncType", "type": "struct"}, {"class": "type", "name": "GenDecl", "type": "struct"}, {"class": "type", "name": "GoStmt", "type": "struct"}, {"class": "type", "name": "Ident", "type": "struct"}, {"class": "type", "name": "IfStmt", "type": "struct"}, {"class": "type", "name": "ImportSpec", "type": "struct"}, {"class": "type", "name": "Importer", "type": "func(imports map[string]*ast.Object, path string) (pkg *ast.Object, err error)"}, {"class": "type", "name": "IncDecStmt", "type": "struct"}, {"class": "type", "name": "IndexExpr", "type": "struct"}, {"class": "type", "name": "InterfaceType", "type": "struct"}, {"class": "type", "name": "KeyValueExpr", "type": "struct"}, {"class": "type", "name": "LabeledStmt", "type": "struct"}, {"class": "type", "name": "MapType", "type": "struct"}, {"class": "type", "name": "MergeMode", "type": "uint"}, {"class": "type", "name": "Node", "type": "interface"}, {"class": "type", "name": "ObjKind", "type": "int"}, {"class": "type", "name": "Object", "type": "struct"}, {"class": "type", "name": "Package", "type": "struct"}, {"class": "type", "name": "ParenExpr", "type": "struct"}, {"class": "type", "name": "RangeStmt", "type": "struct"}, {"class": "type", "name": "ReturnStmt", "type": "struct"}, {"class": "type", "name": "Scope", "type": "struct"}, {"class": "type", "name": "SelectStmt", "type": "struct"}, {"class": "type", "name": "SelectorExpr", "type": "struct"}, {"class": "type", "name": "SendStmt", "type": "struct"}, {"class": "type", "name": "SliceExpr", "type": "struct"}, {"class": "type", "name": "Spec", "type": "interface"}, {"class": "type", "name": "StarExpr", "type": "struct"}, {"class": "type", "name": "Stmt", "type": "interface"}, {"class": "type", "name": "StructType", "type": "struct"}, {"class": "type", "name": "SwitchStmt", "type": "struct"}, {"class": "type", "name": "TypeAssertExpr", "type": "struct"}, {"class": "type", "name": "TypeSpec", "type": "struct"}, {"class": "type", "name": "TypeSwitchStmt", "type": "struct"}, {"class": "type", "name": "UnaryExpr", "type": "struct"}, {"class": "type", "name": "ValueSpec", "type": "struct"}, {"class": "type", "name": "Visitor", "type": "interface"}]]
1 change: 1 addition & 0 deletions data/json/atomic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "func", "name": "AddInt32", "type": "func(addr *int32, delta int32) (new int32)"}, {"class": "func", "name": "AddInt64", "type": "func(addr *int64, delta int64) (new int64)"}, {"class": "func", "name": "AddUint32", "type": "func(addr *uint32, delta uint32) (new uint32)"}, {"class": "func", "name": "AddUint64", "type": "func(addr *uint64, delta uint64) (new uint64)"}, {"class": "func", "name": "AddUintptr", "type": "func(addr *uintptr, delta uintptr) (new uintptr)"}, {"class": "func", "name": "CompareAndSwapInt32", "type": "func(addr *int32, old int32, new int32) (swapped bool)"}, {"class": "func", "name": "CompareAndSwapInt64", "type": "func(addr *int64, old int64, new int64) (swapped bool)"}, {"class": "func", "name": "CompareAndSwapPointer", "type": "func(addr *unsafe.Pointer, old unsafe.Pointer, new unsafe.Pointer) (swapped bool)"}, {"class": "func", "name": "CompareAndSwapUint32", "type": "func(addr *uint32, old uint32, new uint32) (swapped bool)"}, {"class": "func", "name": "CompareAndSwapUint64", "type": "func(addr *uint64, old uint64, new uint64) (swapped bool)"}, {"class": "func", "name": "CompareAndSwapUintptr", "type": "func(addr *uintptr, old uintptr, new uintptr) (swapped bool)"}, {"class": "func", "name": "LoadInt32", "type": "func(addr *int32) (val int32)"}, {"class": "func", "name": "LoadInt64", "type": "func(addr *int64) (val int64)"}, {"class": "func", "name": "LoadPointer", "type": "func(addr *unsafe.Pointer) (val unsafe.Pointer)"}, {"class": "func", "name": "LoadUint32", "type": "func(addr *uint32) (val uint32)"}, {"class": "func", "name": "LoadUint64", "type": "func(addr *uint64) (val uint64)"}, {"class": "func", "name": "LoadUintptr", "type": "func(addr *uintptr) (val uintptr)"}, {"class": "func", "name": "StoreInt32", "type": "func(addr *int32, val int32)"}, {"class": "func", "name": "StoreInt64", "type": "func(addr *int64, val int64)"}, {"class": "func", "name": "StorePointer", "type": "func(addr *unsafe.Pointer, val unsafe.Pointer)"}, {"class": "func", "name": "StoreUint32", "type": "func(addr *uint32, val uint32)"}, {"class": "func", "name": "StoreUint64", "type": "func(addr *uint64, val uint64)"}, {"class": "func", "name": "StoreUintptr", "type": "func(addr *uintptr, val uintptr)"}, {"class": "func", "name": "SwapInt32", "type": "func(addr *int32, new int32) (old int32)"}, {"class": "func", "name": "SwapInt64", "type": "func(addr *int64, new int64) (old int64)"}, {"class": "func", "name": "SwapPointer", "type": "func(addr *unsafe.Pointer, new unsafe.Pointer) (old unsafe.Pointer)"}, {"class": "func", "name": "SwapUint32", "type": "func(addr *uint32, new uint32) (old uint32)"}, {"class": "func", "name": "SwapUint64", "type": "func(addr *uint64, new uint64) (old uint64)"}, {"class": "func", "name": "SwapUintptr", "type": "func(addr *uintptr, new uintptr) (old uintptr)"}, {"class": "type", "name": "Value", "type": "struct"}]]
1 change: 1 addition & 0 deletions data/json/base32.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "func", "name": "NewDecoder", "type": "func(enc *base32.Encoding, r io.Reader) io.Reader"}, {"class": "func", "name": "NewEncoder", "type": "func(enc *base32.Encoding, w io.Writer) io.WriteCloser"}, {"class": "func", "name": "NewEncoding", "type": "func(encoder string) *base32.Encoding"}, {"class": "type", "name": "CorruptInputError", "type": "int64"}, {"class": "type", "name": "Encoding", "type": "struct"}, {"class": "var", "name": "HexEncoding", "type": "*base32.Encoding"}, {"class": "var", "name": "StdEncoding", "type": "*base32.Encoding"}]]
1 change: 1 addition & 0 deletions data/json/base64.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "NoPadding", "type": ""}, {"class": "const", "name": "StdPadding", "type": ""}, {"class": "func", "name": "NewDecoder", "type": "func(enc *base64.Encoding, r io.Reader) io.Reader"}, {"class": "func", "name": "NewEncoder", "type": "func(enc *base64.Encoding, w io.Writer) io.WriteCloser"}, {"class": "func", "name": "NewEncoding", "type": "func(encoder string) *base64.Encoding"}, {"class": "type", "name": "CorruptInputError", "type": "int64"}, {"class": "type", "name": "Encoding", "type": "struct"}, {"class": "var", "name": "RawStdEncoding", "type": "*base64.Encoding"}, {"class": "var", "name": "RawURLEncoding", "type": "*base64.Encoding"}, {"class": "var", "name": "StdEncoding", "type": "*base64.Encoding"}, {"class": "var", "name": "URLEncoding", "type": "*base64.Encoding"}]]
1 change: 1 addition & 0 deletions data/json/big.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "Above", "type": ""}, {"class": "const", "name": "AwayFromZero", "type": ""}, {"class": "const", "name": "Below", "type": ""}, {"class": "const", "name": "Exact", "type": ""}, {"class": "const", "name": "MaxBase", "type": ""}, {"class": "const", "name": "MaxExp", "type": ""}, {"class": "const", "name": "MaxPrec", "type": ""}, {"class": "const", "name": "MinExp", "type": ""}, {"class": "const", "name": "ToNearestAway", "type": ""}, {"class": "const", "name": "ToNearestEven", "type": ""}, {"class": "const", "name": "ToNegativeInf", "type": ""}, {"class": "const", "name": "ToPositiveInf", "type": ""}, {"class": "const", "name": "ToZero", "type": ""}, {"class": "func", "name": "Jacobi", "type": "func(x *big.Int, y *big.Int) int"}, {"class": "func", "name": "NewFloat", "type": "func(x float64) *big.Float"}, {"class": "func", "name": "NewInt", "type": "func(x int64) *big.Int"}, {"class": "func", "name": "NewRat", "type": "func(a int64, b int64) *big.Rat"}, {"class": "func", "name": "ParseFloat", "type": "func(s string, base int, prec uint, mode big.RoundingMode) (f *big.Float, b int, err error)"}, {"class": "type", "name": "Accuracy", "type": "int8"}, {"class": "type", "name": "ErrNaN", "type": "struct"}, {"class": "type", "name": "Float", "type": "struct"}, {"class": "type", "name": "Int", "type": "struct"}, {"class": "type", "name": "Rat", "type": "struct"}, {"class": "type", "name": "RoundingMode", "type": "uint8"}, {"class": "type", "name": "Word", "type": "uintptr"}]]
1 change: 1 addition & 0 deletions data/json/binary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "MaxVarintLen16", "type": ""}, {"class": "const", "name": "MaxVarintLen32", "type": ""}, {"class": "const", "name": "MaxVarintLen64", "type": ""}, {"class": "func", "name": "PutUvarint", "type": "func(buf []byte, x uint64) int"}, {"class": "func", "name": "PutVarint", "type": "func(buf []byte, x int64) int"}, {"class": "func", "name": "Read", "type": "func(r io.Reader, order binary.ByteOrder, data interface{}) error"}, {"class": "func", "name": "ReadUvarint", "type": "func(r io.ByteReader) (uint64, error)"}, {"class": "func", "name": "ReadVarint", "type": "func(r io.ByteReader) (int64, error)"}, {"class": "func", "name": "Size", "type": "func(v interface{}) int"}, {"class": "func", "name": "Uvarint", "type": "func(buf []byte) (uint64, int)"}, {"class": "func", "name": "Varint", "type": "func(buf []byte) (int64, int)"}, {"class": "func", "name": "Write", "type": "func(w io.Writer, order binary.ByteOrder, data interface{}) error"}, {"class": "type", "name": "ByteOrder", "type": "interface"}, {"class": "var", "name": "BigEndian", "type": "binary.bigEndian"}, {"class": "var", "name": "LittleEndian", "type": "binary.littleEndian"}]]
1 change: 1 addition & 0 deletions data/json/bufio.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "MaxScanTokenSize", "type": ""}, {"class": "func", "name": "NewReadWriter", "type": "func(r *bufio.Reader, w *bufio.Writer) *bufio.ReadWriter"}, {"class": "func", "name": "NewReader", "type": "func(rd io.Reader) *bufio.Reader"}, {"class": "func", "name": "NewReaderSize", "type": "func(rd io.Reader, size int) *bufio.Reader"}, {"class": "func", "name": "NewScanner", "type": "func(r io.Reader) *bufio.Scanner"}, {"class": "func", "name": "NewWriter", "type": "func(w io.Writer) *bufio.Writer"}, {"class": "func", "name": "NewWriterSize", "type": "func(w io.Writer, size int) *bufio.Writer"}, {"class": "func", "name": "ScanBytes", "type": "func(data []byte, atEOF bool) (advance int, token []byte, err error)"}, {"class": "func", "name": "ScanLines", "type": "func(data []byte, atEOF bool) (advance int, token []byte, err error)"}, {"class": "func", "name": "ScanRunes", "type": "func(data []byte, atEOF bool) (advance int, token []byte, err error)"}, {"class": "func", "name": "ScanWords", "type": "func(data []byte, atEOF bool) (advance int, token []byte, err error)"}, {"class": "type", "name": "ReadWriter", "type": "struct"}, {"class": "type", "name": "Reader", "type": "struct"}, {"class": "type", "name": "Scanner", "type": "struct"}, {"class": "type", "name": "SplitFunc", "type": "func(data []byte, atEOF bool) (advance int, token []byte, err error)"}, {"class": "type", "name": "Writer", "type": "struct"}, {"class": "var", "name": "ErrAdvanceTooFar", "type": "error"}, {"class": "var", "name": "ErrBufferFull", "type": "error"}, {"class": "var", "name": "ErrFinalToken", "type": "error"}, {"class": "var", "name": "ErrInvalidUnreadByte", "type": "error"}, {"class": "var", "name": "ErrInvalidUnreadRune", "type": "error"}, {"class": "var", "name": "ErrNegativeAdvance", "type": "error"}, {"class": "var", "name": "ErrNegativeCount", "type": "error"}, {"class": "var", "name": "ErrTooLong", "type": "error"}]]
1 change: 1 addition & 0 deletions data/json/build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, [{"class": "const", "name": "AllowBinary", "type": ""}, {"class": "const", "name": "FindOnly", "type": ""}, {"class": "const", "name": "IgnoreVendor", "type": ""}, {"class": "const", "name": "ImportComment", "type": ""}, {"class": "func", "name": "ArchChar", "type": "func(goarch string) (string, error)"}, {"class": "func", "name": "Import", "type": "func(path string, srcDir string, mode build.ImportMode) (*build.Package, error)"}, {"class": "func", "name": "ImportDir", "type": "func(dir string, mode build.ImportMode) (*build.Package, error)"}, {"class": "func", "name": "IsLocalImport", "type": "func(path string) bool"}, {"class": "type", "name": "Context", "type": "struct"}, {"class": "type", "name": "ImportMode", "type": "uint"}, {"class": "type", "name": "MultiplePackageError", "type": "struct"}, {"class": "type", "name": "NoGoError", "type": "struct"}, {"class": "type", "name": "Package", "type": "struct"}, {"class": "var", "name": "Default", "type": "build.Context"}, {"class": "var", "name": "ToolDir", "type": "string"}]]
Loading

0 comments on commit 7b05831

Please sign in to comment.