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

Add back go-source tag #127

Open
abhinav opened this issue Nov 7, 2023 · 5 comments
Open

Add back go-source tag #127

abhinav opened this issue Nov 7, 2023 · 5 comments

Comments

@abhinav
Copy link
Collaborator

abhinav commented Nov 7, 2023

pkg.go.dev uses the go-source for VCS hosts that it doesn't recognize.
We should add back go-source.

Thanks to @hacdias for reporting:


Correct me if I'm wrong, but this seems like a regression. pkg.go.dev still uses go-source for unknown VCS systems: https://pkg.go.dev/about#source-links - right now, Sally only supports GitHub, but it'd be great if it were more generic.

Originally posted by @hacdias in #83 (comment)

@SoulPancake
Copy link
Contributor

Can I do this again haha @abhinav
I was the one who removed it

@abhinav
Copy link
Collaborator Author

abhinav commented Nov 7, 2023

Sure, @SoulPancake, go for it!

@hacdias
Copy link
Contributor

hacdias commented Nov 7, 2023

@SoulPancake if you're at it, it would be great if you could take this PR into account (#128) and added some field that lets users override the source value via the config. If not, I can always make another PR if that'd be welcomed.

@abhinav
Copy link
Collaborator Author

abhinav commented Nov 10, 2023

It seems to me that if we want to support alternative VCSs per #128, we can't hard-code it to GitHub's directory/file path scheme like we did previously. We'll need something like a fileTemplate and a dirTemplate field to allow setting them to arbitrary values per https://github.com/golang/gddo/wiki/Source-Code-Links. Does that sound right to you, @hacdias?

@hacdias
Copy link
Contributor

hacdias commented Nov 10, 2023

Yeah, I think so. I would add both variables you mentioned. Only if both are set, add go-source.

By default, I wouldn't set go-source, as chances are most people will be using known VCS services/systems.

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

No branches or pull requests

3 participants