gh

package module
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 6 Imported by: 1

README

gh

GitHub API helpers.

Documentation

Overview

Package gh provides GitHub API helpers used by many FerretDB repos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRESTClient

func NewRESTClient(token string, debugf Printf) (*github.Client, error)

NewRESTClient returns GitHub REST API client for the given token (that may be empty) and debug logging function (that may be nil).

func NewTransport

func NewTransport(source http.RoundTripper, debugf Printf) http.RoundTripper

NewTransport returns a new http.RoundTripper that wraps the source with debug logging. Both should be set.

func NoopPrintf

func NoopPrintf(string, ...any)

NoopPrintf is a Printf function that does nothing.

Types

type Printf

type Printf func(format string, args ...any)

Printf is a (fmt.Printf|log.Printf|testing.T.Logf)-like function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL