Giter VIP home page Giter VIP logo

Comments (9)

nathany avatar nathany commented on July 24, 2024

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.

dmitshur avatar dmitshur commented on July 24, 2024

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.

nathany avatar nathany commented on July 24, 2024

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.

dmitshur avatar dmitshur commented on July 24, 2024

@niemeyer Any comments on my original question?

from gopkg.

slimsag avatar slimsag commented on July 24, 2024

I share the same concern as @nathany, whatever the approach I would like it to work with custom domains.

from gopkg.

niemeyer avatar niemeyer commented on July 24, 2024

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.

dmitshur avatar dmitshur commented on July 24, 2024

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.

dmitshur avatar dmitshur commented on July 24, 2024

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.

dmitshur avatar dmitshur commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.