Documentation ¶
Overview ¶
Package index is an unofficial library for index.golang.org.
It implements pagination, and exposes a language native structure, while retaining parametric control.
Example ¶
m, err := Get(ctx, Inception, Page) fmt.Println(len(m), err)
Output: 2000 <nil>
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
Inception is the the oldest allowable timestamp.
While time.Time{} is valid, it is the oldest package in the index.
Functions ¶
This section is empty.
Types ¶
type Limit ¶
type Limit uint
Limit is the maximum length of the returned list.
The default, zero, represents infinity.
Example ¶
m, err := Get(ctx, Limit(1)) fmt.Println(m, err)
Output: [{golang.org/x/text v0.3.0 2019-04-10 19:08:52.997264 +0000 UTC}] <nil>
const Page Limit = 2000
Page is the default page size for the index api.
type Module ¶
type Module struct { // Path is the full import path. Path string `json:"Path"` // Version is a Semantic Version. Version string `json:"Version"` // Timestamp is when this was released. Timestamp time.Time `json:"Timestamp"` }
Module is an entry in the index.
Click to show internal directories.
Click to hide internal directories.