goggle
1.0.0
通過速度搜索您的API
Goggle是類型定向的搜索引擎,例如Hoogle,但要去
親自嘗試一下!現在,您可以訪問此處查看Goggle的行動。

You can type query to search and filter results.
最簡單的形式是僅GO的標準函數定義。
func length ( s string ) int但是我們可以省略一個函數名稱,以檢索名稱與length不匹配的結果。
func ( s string ) int我們也可以省略一個func關鍵字。
( s string ) int最後,我們可以省略參數名稱。
( string ) int Type = Primitives | SliceType | PointerType | identifier .
Primitives = " bool " | Int | UInt | " float32 " | " float64 " | " complex64 " | " complex128 " .
Int = " int " | " int8 " | " int16 " | " int32 " | " int64 " .
UInt = " uint " | " uint8 " | " uint16 " | " uint32 " | " uint64 " | " uintptr " .
SliceType = " [ " " ] " Type .
Parameters = " ( " [ Type { " , " Type } ] " ) " .
Query = [ " func " ] [ identifier ] Parameters [ Type ] .$ git clone https://github.com/abiriadev/goggle && cd goggle$ go run ./cmd/indexer
# or
$ go run ./cmd/indexer < space separated list of packages to index >有關更多信息,請參見幫助頁面:
Usage of indexer:
-f string
index format (default " gob " )
-o string
path to save index file$ go run ./cmd/repl
# or optionally pass a path to index file to use
$ go run ./cmd/repl < index file to use >然後,它將向您顯示以λ開頭的提示。
鍵入任何查詢(例如() bool )並輸入以查看結果。
λ () bool
func utf8 . FullRune () bool // FullRune reports whether the bytes in p begin with a full UTF-8 encoding of a rune.
func nettest . TestableAddress () bool // TestableAddress reports whether address of network is testable on the current platform configuration.
func nettest . SupportsRawSocket () bool // SupportsRawSocket reports whether the current session is available to use raw sockets.
func nettest . SupportsIPv6 () bool // SupportsIPv6 reports whether the platform supports IPv6 networking functionality.
func nettest . SupportsIPv4 () bool // SupportsIPv4 reports whether the platform supports IPv4 networking functionality.
func signal . Ignored () bool // Ignored reports whether sig is currently ignored.
func slices . Equal () bool // Equal reports whether two slices are equal: the same length and all elements equal.
func testenv . OptimizationOff () bool // OptimizationOff reports whether optimization is disabled.
func testenv . HasSymlink () bool // HasSymlink reports whether the current system can use os.Symlink.
func testenv . HasSrc () bool // HasSrc reports whether the entire source tree is available under GOROOT.$ go run ./cmd/goggle默認端口號為6099 (L33T或Gogg )。您可以通過-port選項來更改它。
Usage of goggle:
-port int
port number to bind (default 6099)嘗試從終端請求:
$ http :6099/search q= ' () bool ' -v
POST /search HTTP/1.1
Accept: application/json, * / * ; q=0.5
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 15
Content-Type: application/json
Host: localhost:6099
User-Agent: HTTPie/3.2.1
{
" q " : " () bool "
}
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Content-Length: 1970
Content-Type: text/plain ; charset=utf-8
Date: Tue, 12 Dec 2023 04:12:01 GMT
{
" items " : [
{
" sim " : 0,
" sig " : " func utf8.FullRune() bool " ,
" summary " : " FullRune reports whether the bytes in p begin with a full UTF-8 encoding of a rune. " ,
" link " : " https://pkg.go.dev/unicode/utf8#FullRune "
},
{
" sim " : 0,
" sig " : " func nettest.TestableAddress() bool " ,
" summary " : " TestableAddress reports whether address of network is testable on the current platform configuration. " ,
" link " : " https://pkg.go.dev/golang.org/x/net/nettest#TestableAddress "
},
...
]
}確保已安裝了已安裝的任務,Node.js和Binaryen。
然後,執行以下命令:
$ task wasm-exec syntaxck
$ corepack enable
$ pnpm install --frozen-lockfile
$ cd frontend如果您不想擁有本地的Goggle代理,則可以通過設置VITE_EXTERN_ENDPOINT變量來指定已經部署的端點。
$ echo ' VITE_EXTERN_ENDPOINT=<type your endpoint url here> ' > .env.production然後,跑!
$ pnpm dev
# Or, to use an external endpoint:
$ pnpm dev --mode production用於建立部署或服務的前端:
$ pnpm build有很多方法可以支持和為護目鏡的持續維護和改進做出貢獻。任何支持都將不勝感激!