Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting point #1

Merged
merged 12 commits into from Sep 30, 2016
Merged

Starting point #1

merged 12 commits into from Sep 30, 2016

Conversation

HelloGrayson
Copy link
Contributor

I whipped up this quick and dirty MVP today. It's powering the Go package breerly.github.io/test/ptr at the moment, which is being hosted via Github Pages via this repo: https://github.com/breerly/test

How it works

Given the following sally.yaml:

---

url: breerly.github.io/test

packages:
  ptr:
    repo: github.com/breerly/ptr

The site is generated using sally and the html files are committed to the repo:

$ go install github.com/uber-go/sally
$ sally -dir .
$ git commit -am "site generated"

Pushing the repo results in the static site being updated:

$ git push
$ wget breerly.github.io/test/ptr

This enables the package to be installed using the canonical path:

$ go get breerly.github.io/ptr

I intend to do the following before OSS'ing this repo:

  • Get go.uber.org in a state where we're happy
  • Clean up and write tests
  • Write a guide for using sally

@HelloGrayson
Copy link
Contributor Author

HelloGrayson commented Aug 7, 2016

cc @prashantv @abhinav

@HelloGrayson
Copy link
Contributor Author

Worth noting that the source declares the canonical import path here: https://github.com/breerly/ptr/blob/master/ptr.go#L22

package ptr // import "breerly.github.io/test/ptr"

This forces the user to use the canonical path by raising an error if installed directly:

$ go get github.com/breerly/ptr
can't load package: package github.com/breerly/ptr: code in directory $GOPATH/src/github.com/breerly/ptr expects import "breerly.github.io/test/ptr"

}

err = Write(c, *dir)
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline

@HelloGrayson HelloGrayson merged commit cba4417 into master Sep 30, 2016
@abhinav abhinav deleted the mvp branch January 3, 2019 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants