···11-// Command zoekt-archive-index indexes an archive.
11+// Command zoekt-archive-index indexes a git archive.
22//
33-// Example via github.com:
33+// Examples using github.com:
44//
55// zoekt-archive-index -incremental -commit b57cb1605fd11ba2ecfa7f68992b4b9cc791934d -name github.com/gorilla/mux -strip_components 1 https://codeload.github.com/gorilla/mux/legacy.tar.gz/b57cb1605fd11ba2ecfa7f68992b4b9cc791934d
66//
+2-2
cmd/zoekt-dynamic-indexserver/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This program manages a zoekt dynamic indexing deployment:
1515+// Command zoekt-dynamic-indexserver starts a server to manage dynamic indexing. In contrast to
1616+// zoekt-indexserver, it's designed for a "push-based" indexing model. The server
1617// * listens to indexing commands
1718// * reindexes specified repositories
1818-1919package main
20202121import (
+1-1
cmd/zoekt-git-clone/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This binary fetches all repos of a user or organization and clones
1515+// Command zoekt-git-clone fetches all repos of a user or organization and clones
1616// them. It is strongly recommended to get a personal API token from
1717// https://github.com/settings/tokens, save the token in a file, and
1818// point the --token option to it.
+2
cmd/zoekt-git-index/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515+// Command zoekt-git-index indexes a single git repository. It works directly with git
1616+// repositories and supports git-specific features like branches and submodules.
1517package main
16181719import (
+1
cmd/zoekt-index/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515+// Command zoekt-index indexes a directory of files.
1516package main
16171718import (
+2-5
cmd/zoekt-indexserver/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This program manages a zoekt indexing deployment:
1616-// * recycling logs
1717-// * periodically fetching new data.
1818-// * periodically reindexing all git repos.
1919-1515+// Command zoekt-indexserver starts a service that periodically reindexes repositories. It follows
1616+// a "pull-based" design, where it reaches out to code hosts to fetch new data.
2017package main
21182219import (
+13
cmd/zoekt-merge-index/main.go
···11+// Licensed under the Apache License, Version 2.0 (the "License");
22+// you may not use this file except in compliance with the License.
33+// You may obtain a copy of the License at
44+//
55+// http://www.apache.org/licenses/LICENSE-2.0
66+//
77+// Unless required by applicable law or agreed to in writing, software
88+// distributed under the License is distributed on an "AS IS" BASIS,
99+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010+// See the License for the specific language governing permissions and
1111+// limitations under the License.
1212+1313+// Command zoekt-merge-index merges a set of index shards into a compound shard.
114package main
215316import (
+2-3
cmd/zoekt-mirror-bitbucket-server/main.go
···1010// See the License for the specific language governing permissions and
1111// limitations under the License.
12121313-// This binary fetches all repos of a project, and of a specific type, in case
1414-// these are specified, and clones them. By default it fetches and clones all
1515-// existing repos.
1313+// Command zoekt-mirror-bitbucket-server fetches all repos of a bitbucket project,
1414+// optionally of a specific type, and clones them.
1615package main
17161817import (
+1-2
cmd/zoekt-mirror-gerrit/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This binary fetches all repos of a Gerrit host.
1616-1515+// Command zoekt-mirror-gerrit fetches all repos of a Gerrit host.
1716package main
18171918import (
+4-4
cmd/zoekt-mirror-gitea/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This binary fetches all repos of a user or organization and clones
1616-// them. It is strongly recommended to get a personal API token from
1717-// https://gitea.com/user/settings/applications, save the token in a
1818-// file, and point the --token option to it.
1515+// Command zoekt-mirror-gerrit fetches all repos of a gitea user or organization
1616+// and clones them. It is strongly recommended to get a personal API token from
1717+// https://gitea.com/user/settings/applications, save the token in a file, and point
1818+// the --token option to it.
1919package main
20202121import (
+4-4
cmd/zoekt-mirror-github/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This binary fetches all repos of a user or organization and clones
1616-// them. It is strongly recommended to get a personal API token from
1717-// https://github.com/settings/tokens, save the token in a file, and
1818-// point the --token option to it.
1515+// Command zoekt-mirror-github fetches all repos of a github user or organization
1616+// and clones them. It is strongly recommended to get a personal API token from
1717+// https://github.com/settings/tokens, save the token in a file, and point the
1818+// --token option to it.
1919package main
20202121import (
+2-2
cmd/zoekt-mirror-gitiles/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// This binary fetches all repos of a Gitiles host. It does double
1616-// duty for other "simple" web hosts
1515+// Command zoekt-mirror-gitiles fetches all repos of a Gitiles host.
1616+// It does double duty for other "simple" web hosts.
1717package main
18181919import (
+2-2
cmd/zoekt-mirror-gitlab/main.go
···1010// See the License for the specific language governing permissions and
1111// limitations under the License.
12121313-// This binary fetches all repos for a user from gitlab.
1313+// Command zoekt-mirror-gitlab fetches all repos for a user from gitlab.
1414//
1515// It is recommended to use a gitlab personal access token:
1616// https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html. This
1717// token should be stored in a file and the --token option should be used.
1818// In addition, the token should be present in the ~/.netrc of the user running
1919-// the mirror command. For example, the ~/.netrc may look like:
1919+// Command mirror. For example, the ~/.netrc may look like:
2020//
2121// machine gitlab.com
2222// login oauth
+3-2
cmd/zoekt-repo-index/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// zoekt-repo-index indexes a repo-based repository. The constituent git
1515+// Command zoekt-repo-index indexes repository that uses the Android 'repo'
1616+// tool (https://android.googlesource.com/tools/repo). The constituent git
1617// repositories should already have been downloaded to the --repo_cache
1717-// directory, eg.
1818+// directory, for example:
1819//
1920// go install github.com/sourcegraph/zoekt/cmd/zoekt-repo-index &&
2021//
+15-2
cmd/zoekt-sourcegraph-indexserver/main.go
···11-// Command zoekt-sourcegraph-indexserver periodically reindexes enabled
22-// repositories on sourcegraph
11+// Licensed under the Apache License, Version 2.0 (the "License");
22+// you may not use this file except in compliance with the License.
33+// You may obtain a copy of the License at
44+//
55+// http://www.apache.org/licenses/LICENSE-2.0
66+//
77+// Unless required by applicable law or agreed to in writing, software
88+// distributed under the License is distributed on an "AS IS" BASIS,
99+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010+// See the License for the specific language governing permissions and
1111+// limitations under the License.
1212+1313+// Command zoekt-sourcegraph-indexserver periodically reindexes repositories
1414+// from a Sourcegraph instance. It uses a "pull-based" design, where it periodically
1515+// reaches out to the Sourcegraph instance for the list of repositories to reindex.
316package main
417518import (
+1-1
cmd/zoekt-test/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// zoekt-test compares the search engine results with raw substring search
1515+// Command zoekt-test compares the zoekt results with raw substring search.
1616package main
17171818import (
+2-3
cmd/zoekt-webserver/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// Command zoekt-webserver responds to search queries, using an index generated
1616-// by another program such as zoekt-indexserver.
1717-1515+// Command zoekt-webserver starts a server that responds to search queries, using
1616+// an index generated by another program such as zoekt-indexserver.
1817package main
19182019import (
+1
cmd/zoekt/main.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515+// The 'zoekt' command supports searching over an index directory or shard.
1516package main
16171718import (
+12
ignore/ignore.go
···11+// Licensed under the Apache License, Version 2.0 (the "License");
22+// you may not use this file except in compliance with the License.
33+// You may obtain a copy of the License at
44+//
55+// http://www.apache.org/licenses/LICENSE-2.0
66+//
77+// Unless required by applicable law or agreed to in writing, software
88+// distributed under the License is distributed on an "AS IS" BASIS,
99+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010+// See the License for the specific language governing permissions and
1111+// limitations under the License.
1212+113// Package ignore provides helpers to support ignore-files similar to .gitignore
214package ignore
315
+2-2
index/builder.go
···1212// See the License for the specific language governing permissions and
1313// limitations under the License.
14141515-// package build implements a more convenient interface for building
1616-// zoekt indices.
1515+// Package index contains logic for building Zoekt indexes. NOTE: this package is not considered
1616+// part of the public API, and it is not recommended to rely on it in external code.
1717package index
18181919import (
+16
query/doc.go
···11+// Licensed under the Apache License, Version 2.0 (the "License");
22+// you may not use this file except in compliance with the License.
33+// You may obtain a copy of the License at
44+//
55+// http://www.apache.org/licenses/LICENSE-2.0
66+//
77+// Unless required by applicable law or agreed to in writing, software
88+// distributed under the License is distributed on an "AS IS" BASIS,
99+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010+// See the License for the specific language governing permissions and
1111+// limitations under the License.
1212+1313+// Package query contains the API for creating Zoekt queries. Queries can be
1414+// constructed directly through query.Q objects, or by parsing a string using
1515+// query.Parse
1616+package query
+15
web/doc.go
···11+// Licensed under the Apache License, Version 2.0 (the "License");
22+// you may not use this file except in compliance with the License.
33+// You may obtain a copy of the License at
44+//
55+// http://www.apache.org/licenses/LICENSE-2.0
66+//
77+// Unless required by applicable law or agreed to in writing, software
88+// distributed under the License is distributed on an "AS IS" BASIS,
99+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010+// See the License for the specific language governing permissions and
1111+// limitations under the License.
1212+1313+// Package web contains the logic for spinning up a zoekt webserver. It's exposed separately
1414+// from zoekt-webserver to allow for customizing the endpoints and format templates.
1515+package web