go icon indicating copy to clipboard operation
go copied to clipboard

Allow path after a shortcut: go/short/foobar

Open ghost opened this issue 6 years ago • 2 comments

This allows adding additional path to a shortened URL. For example, if go/short redirects to http://example.com, go/short/foobar will redirect to http://example.com/foobar.

An example usage is to shorten Google Docs headings. go/mydoc can redirect to a document. go/mydoc/#heading=h.asdfgh123456 can then redirect to a specific heading in the doc.

This feature is supported in the original golinks at Google.

Next step: Create a chrome extension that links to the go/ server and shortens a given link based on the shortcuts already registered

ghost avatar Dec 14 '18 16:12 ghost

shouldn't we have a special placeholder defined in the route, instead of simply appending ?

I get that appending cover most cases but I wonder...

mathieujobin avatar Mar 10 '19 02:03 mathieujobin

there is a compilation error in api.go, need to update the 3 calls to parseName

 GOPATH=`pwd` go get github.com/deepanshu-zendrive/go
# github.com/kellegous/go/web
src/github.com/kellegous/go/web/api.go:78:4: assignment mismatch: 1 variable but parseName returns 2 values
src/github.com/kellegous/go/web/api.go:128:4: assignment mismatch: 1 variable but parseName returns 2 values
src/github.com/kellegous/go/web/api.go:148:4: assignment mismatch: 1 variable but parseName returns 2 values

mathieujobin avatar Mar 10 '19 03:03 mathieujobin