Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Compare: Source Code Links

Showing with 120 additions and 3 deletions.
  1. +78 −0 API.md
  2. +17 −0 Development-Environment-Setup.md
  3. +3 −3 Home.md
  4. +9 −0 Plain-Text-Interface.md
  5. +13 −0 Source-Code-Links.md
13 changes: 13 additions & 0 deletions Source-Code-Links.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ following substitutions are made in the file template:
{file} - The name of the file
{line} - The decimal line number.

_Note:_ The [current implementation](https://github.com/golang/gddo/blob/d5e22321f6d50a058e175b602f2cc55a66a62a18/gosrc/gosrc.go#L379-L390)
imposes a few additional restrictions to the description above. In order for the file field to have an
effect (and not have unexpected adverse effects), these rules must be followed until the implementation is fixed:

- The file field URL template must contain at least one instance of `{file}`.
- If a `#` is present in the URL template, all instances of `{file}` must come before the `#`.
All instances of `{file}` that come after `#` will not be substituted.
- The `{line}` component is optional, but if it is to be included, then the file field
must contain `#` and the instance of `{line}` must be after the `#`. Instances of `{line}` that come
before `#` will not be substituted.
- In order for `{line}` substitutions to be made, no more than one instance of `{line}` must appear in the file field after `#`.
- It's okay for `%` to be present after `#`, but not before.

The meta tag content attribute must contain four fields. Use "_" to fallback to
GoDoc.org's defaults for home, directory and file.

Expand Down