Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
/ sherlock Public archive

A tool to search and index Golang projects in Sally vanity config

License

Notifications You must be signed in to change notification settings

jwillker/sherlock

Repository files navigation

icon Sherlock

Go Report Card License Golang build golangci-lint

A tool to search and index Golang projects in Sally vanity config

Install

go install github.com/jwillker/sherlock@latest 

or download the binary specific for your OS.

How to use

⚠️ For now it only supports gitlab

Usage:
  sherlock investigate [flags]

Flags:
  -u, --base-url string     GitLab api url. Default https://gitlab.com/api/v4
  -d, --godoc string        Godoc URL
  -g, --group-id int        GitLab group id
  -h, --help                help for investigate
  -o, --output string       Vanity packages config. Default: packages.yaml (default "packages.yaml")
  -v, --vanity-url string   Sally vanity URL

Example

Running:

sherlock investigate -u https://gitlab.my-company.com/api/v4 -g 123 -d godoc.my-company.com/pkg -v go.my-company.com

Result:

cat packages.yaml

godoc:
    host: godoc.my-company.com/pkg
url: go.my-company.com
packages:
    logs:
        repo: https://gitlab.my-company.com/libs/golang/logs.git
    sqs:
        repo: https://gitlab.my-company.com/libs/golang/sqs.git

So you can host this using Sally vanity by running:

sally -yml packages.yaml -port 8080

Developing

Use make help to see what to run, some options:

help                           Show Help
build                          Build sherlock
dep                            Get the dependencies
lint                           Run linter
race                           Run data race detector
msan                           Run memory sanitizer
test                           Run tests