aboutsummaryrefslogtreecommitdiff
path: root/handler_test.go (follow)
Commit message (Collapse)AuthorAgeFiles
* Add support for sub-indexes (#120)Abhinav Gupta2023-10-181
| | | | | | | | | | | | | | | | | | | | | | | | | | | | <details> <summary>Background</summary> Sally renders two kinds of pages: - packages: These are for packages defined in sally.yaml and any route under the package path. - indexes: These list available packages. The latter--indexes was previously only supported at '/', the root page. This leads to a slight UX issue: if you have a package with a / in its name (e.g. net/metrics): - example.com/net/metrics gives you the package page - example.com/ lists net/metrics - However, example.com/net fails with a 404 </details> This adds support for index pages on all parents of package pages. Therefore, if example.com/net/metrics exists, example.com/net will list all packages defined under that path. Resolves #31
* Removing redundant go-source tag (#92)Anurag Bandyopadhyay2023-05-071
| | | | | | | | | | | | | | | | | | | | | | | | | * update: removing redundant go-source tag * fix: removing /.idea and adding dir to gitignore * fix: removing /.idea and removing branch field from from templateData * fix: pkgHndler defaultBranch rem revert * fix: minor typo * fix: removing assertion of template responses * fix: tabs * Update handler_test.go * Update handler_test.go * Update handler_test.go --------- Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com>
* config: Rename Package to PackageConfig, add docs (#84)Abhinav Gupta2023-04-281
| | | | | | | | | | | Renames the Package struct to PackageConfig to make it clear that it is a configuration struct. This differentiation will help disconnect the configuration-level representation from the runtime representation of this information. This patch also adds documentation to the config package that was previously missing.
* Drop httprouter dependency (#71)Abhinav Gupta2023-01-231
| | | | | | | | | | | | | | This drops the third-party HTTP router dependency. This dependency wasn't strictly necessary since our routing needs are quite basic: - `/$name` and `/$name/*` for all registered packages - `/` for root This is easily accomplished with `http.ServeMux`: - register `/$name` and `/$name/`. The latter will receive all subpackage requests. - register `/` and reject anything that isn't for exactly `/`.
* Add support for package descriptions (#68)Abhinav Gupta2023-01-231
| | | | | | | | | | | | | | | | | | | * template: Use a more fluid layout Instead of using a table, take advantage of the grid layout. We still print a table of sorts, but it's more fluid in appearance based on width of the screen. On narrower screens, we'll show a listing where each item has a description label next to it rather than at the top. * Add support for package descrpitions Packages may now optionally specify a description. If specified, this is printed below the package information, indented one column to make it stand out. Co-authored-by: Sung Yoon Whang <sungyoonwhang@gmail.com>
* Support package-level overrides for URLs (#52)Tyler Sullivan2022-01-031
| | | | | | | | | | | | | | | | | | Sally accepts the base vanity URL (e.g. `go.uber.org`) in a top-level `url` key. This applies to all packages listed in the configuration. Add support for overriding the `url` on a per-package basis. This will provide for an easier transition period when migrating Go packages of an organization between hosts, for example from BitBucket to GitHub. With this, source code can be modified across the various repositories over time to use the new vanity URL. For example, some packages will use a URL of bitbucketurl.org and some will use mycoolgoimportvanity.org in their source code imports. Other than the use-case outlined above, this feature adds flexibility to the vanity server to support more than one vanity URL when used behind an ingress controller.
* Update Godoc server to pkg.go.dev (#40)SyrieBianco2020-02-121
| | | | | | Update our default Godoc server from `` to the shiny, new `https://pkg.go.dev/` See https://github.com/uber-go/sally/issues/39, T4832833
* template: Bundle in binary with bindata (#36)Abhinav Gupta2019-01-031
| | | | | | | | This uses go-bindata/go-bindata to bundle the template in the binary. I also realized that the handler test was now broken because we were checking the exact contents of the index page in the test. This change fixes that too.
* Enforce alphabetical ordering of packages in YAML config (#22)Garrett Squire2016-10-271
|
* Rework as HTTP server (#15)Grayson Koonce2016-10-121