Comments (9)
One approach would be a tool that tells you what packages are outdated. Whether using gopkg.in or not (Git SHA, tags/branches).
from gopkg.
Well, I have two tools [1][2] that I use to find out when there are updates for normal Go packages (and update them via go get -u
).
As is, they won't work to tell me if "gopkg.in/pipe.v3" happens to come out tomorrow, because that's a completely new Go package with a different import path that doesn't exist in my GOPATH, and "gopkg.in/pipe.v2" will be reported as "the latest version".
I could work my way around it and look for branches/tags in the GitHub repo... but before I start doing anything on my own, I want an official approach that is sanctioned by gopkg.in itself. That's why I'm asking this here.
[1] - https://github.com/shurcooL/gostatus
[2] - https://github.com/shurcooL/Go-Package-Store
from gopkg.
What I was thinking is to fetch origin (not merge/pull) and look for refs in the same format as gopkg.in (v3).
A gopkg.in API would be a nice solution too, though it doesn't seem as generally applicable. (If I set up my own instance of gopkg.in on another domain, your app would need to know to query it).
from gopkg.
@niemeyer Any comments on my original question?
from gopkg.
I share the same concern as @nathany, whatever the approach I would like it to work with custom domains.
from gopkg.
Just to be clear, the fact gopkg.in won't update automatically when go get -u
is run is part of the main reason why it exists. If it updated automatically every time, then the software would be incompatible on major versions.
Regarding an API that tells whether a given revision is available:
$ curl -I gopkg.in/yaml.v3
HTTP/1.1 404 Not Found
Date: Mon, 01 Dec 2014 13:28:29 GMT
Content-Length: 98
Content-Type: text/plain; charset=utf-8
$ curl -I gopkg.in/yaml.v2
HTTP/1.1 200 OK
Content-Type: text/html
Date: Mon, 01 Dec 2014 13:28:31 GMT
Should be trivial to build a tool that reports whether X+1 is available based on the local package list.
from gopkg.
Regarding an API that tells whether a given revision is available:
Should be trivial to build a tool that reports whether X+1 is available based on the local package list.
@niemeyer Thanks, I appreciate the information. That makes sense and I can work with it.
It's not that I couldn't have figured it out on my own, but rather I wanted to be following an official specification rather than trying to come up with one on my own.
from gopkg.
Just to be clear, the fact gopkg.in won't update automatically when go get -u is run is part of the main reason why it exists.
It will update to the latest version that falls within the same major version, but of course it won't jump to a higher major version on its own.
Given that you've answered my original question, this issue can be closed. But it would be helpful to make the API available somewhere more visible, like a section in README or on a wiki page.
from gopkg.
Given that you've answered my original question, this issue can be closed.
I'll do that now. Thanks again!
from gopkg.
Related Issues (20)
- changeRefs implementation causes an ambiguous default branch. HOT 1
- getting master instead of v1 HOT 6
- gopkg doesn't choose latest tag in major release HOT 1
- beta version 0.1 and 0.2 HOT 1
- go get: remote error: tls: internal error HOT 3
- fsnotify breakage HOT 6
- Installed binary contains version number in name HOT 5
- "cannot talk to GitHub" HOT 80
- Failed to connect to gopkg.in port 443: Operation timed out HOT 1
- cannot talk to GitHub HOT 1
- Installations from gopkg.in failing HOT 8
- gopkg.in/srwiley/oksvg.gradfix does not resolve HOT 1
- Do not accept self-signed certificates HOT 1
- go get gopkg.in/yaml.v1 fatal error HOT 1
- Git transfer failure when fetching with Go 1.12 or older HOT 1
- fatal: unable to access 'https://gopkg.in/yaml.v3/': server certificate verification failed. HOT 8
- Cannot talk to GitHub HOT 48
- Cannot obtain refs from GitHub: cannot talk to GitHub HOT 6
- gopkg cannot talk to github HOT 4
- Package stuck at older version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gopkg.