Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

lwupdater

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Lacework Updater

A Go library to check for available updates of Lacework projects.

Usage

Download the library into your $GOPATH:

$ go get github.com/lacework/go-sdk/v2/lwupdater

Import the library into your tool:

import "github.com/lacework/go-sdk/v2/lwupdater"

Examples

This example checks for the latest release of this repository (https://github.com/lacework/go-sdk):

package main

import (
	"fmt"

	"github.com/lacework/go-sdk/v2/lwupdater"
)

func main() {
	var (
		project  = "go-sdk"
		sdk, err = lwupdater.Check(project, "v0.1.0")
	)

	if err != nil {
		fmt.Println("Unable to check for updates: %s", err)
	} else {
		// Output: The latest release of the go-sdk project is v0.1.7
		fmt.Printf("The latest release of the %s project is %s\n",
			project, sdk.LatestVersion,
		)
	}
}

Look at the _examples/ folder for more examples.