gist

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package gist uploads a vexscan report to a GitHub gist so results can be shared with a single URL. It uses the same GITHUB_TOKEN / GH_TOKEN that the --llm path relies on, so it works inside the container image without the gh CLI.

Index

Constants

View Source
const DefaultEndpoint = "https://api.github.com/gists"

DefaultEndpoint is the GitHub REST API gists endpoint.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	HTTP     *http.Client
	Endpoint string
	Token    string
}

Client creates gists via the GitHub REST API.

func NewClient

func NewClient(token string) (*Client, error)

NewClient builds a Client. The token is read from GITHUB_TOKEN (or GH_TOKEN) unless supplied explicitly. It errors if no token is available.

func (*Client) Create

func (c *Client) Create(ctx context.Context, filename, description, content string, public bool) (string, error)

Create uploads content as a single-file gist (public when public is true) and returns its html_url.

Jump to

Keyboard shortcuts

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