directory
Version:
v5.9.1
Opens a new window with list of versions in this module.
Published: Apr 12, 2026
License: Apache-2.0, Apache-2.0
Opens a new window with license information.
README
¶
crow-go
import (
"codefloe.com/crowci/crow/v5/crow-go/crow"
"golang.org/x/oauth2"
)
const (
token = "dummyToken"
host = "http://crow.company.tld"
)
func main() {
// create an http client with oauth authentication.
config := new(oauth2.Config)
authenticator := config.Client(
oauth2.NoContext,
&oauth2.Token{
AccessToken: token,
},
)
// create the crow client with authenticator
client := crow.NewClient(host, authenticator)
// gets the current user
user, err := client.Self()
fmt.Println(user, err)
// gets the named repository information
repo, err := client.RepoLookup("crow-ci/crow")
fmt.Println(repo, err)
}
Directories
¶
Click to show internal directories.
Click to hide internal directories.