fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

Document all the commands + packages (#904)

This PR adds doc comments for all packages/ commands.

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