Skip to content

Latest commit

 

History

History
102 lines (71 loc) · 1.63 KB

readme.md

File metadata and controls

102 lines (71 loc) · 1.63 KB

Grignotin

GitHub tag (latest SemVer) PkgGoDev Build Status

A collection of small helpers around Go proxy, Go meta information, etc.

goproxy

A small Go proxy client to get information about a module from a Go proxy.

package main

import (
	"fmt"

	"github.com/ldez/grignotin/goproxy"
)

func main() {
	client := goproxy.NewClient("")

	versions, err := client.GetVersions("github.com/ldez/grignotin")
	if err != nil {
		panic(err)
	}

	fmt.Println(versions)
}

metago

A small lib to fetch meta information (go-import, go-source) for a module.

package main

import (
	"fmt"

	"github.com/ldez/grignotin/metago"
)

func main() {
	meta, err := metago.Get("github.com/ldez/grignotin")
	if err != nil {
		panic(err)
	}

	fmt.Println(meta)
}

Version

Gets information about releases and build.

package main

import (
	"fmt"

	"github.com/ldez/grignotin/version"
)

func main() {
    includeAll := false
	releases, err := version.GetReleases(includeAll)
	if err != nil {
		panic(err)
	}

	fmt.Println(releases)
}
package main

import (
	"fmt"

	"github.com/ldez/grignotin/version"
)

func main() {
	build, err := version.GetBuild()
	if err != nil {
		panic(err)
	}

	fmt.Println(build)
}

SumDB

  • I recommend using the package sumdb