Help us shape the future of Go! Take the 2026 Go Developer Survey

gatekit

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package gatekit is what several gates share that is not git, a TSV record or an MCP session: the repository's names, how a list of problems becomes one failure, and the few readers more than one gate needs.

Index

Constants

View Source
const (
	// ModulePath is this module, as go.mod declares it.
	ModulePath = "github.com/mmedum/gitlab-mcp/v4"
	// BinaryName is the server's command and archive name.
	BinaryName = "gitlab-mcp"
	// MainPackage is what `go build` builds for the server.
	MainPackage = "./cmd/" + BinaryName
	// PlaceholderVersion is the version the committed manifest carries.
	// A real version in the tree is a stale version waiting to ship.
	PlaceholderVersion = "0.0.0-dev"
)

Variables

This section is empty.

Functions

func Clip

func Clip(s string, n int) string

Clip shortens s to at most n bytes plus an ellipsis, cutting on a rune boundary so a quoted excerpt stays valid UTF-8.

func Floor

func Floor(what string, read, min int) []string

Floor is a problem when read is below min: zero findings and zero inputs are otherwise the same output.

func MarkdownSection

func MarkdownSection(text, heading string) (section string, ok bool)

MarkdownSection is the text under a heading line, to the next heading of the same or a higher level: a subsection stays inside its parent. ok is false when the heading is not there.

func ParseGoDir

func ParseGoDir(fset *token.FileSet, dir string, mode parser.Mode, tags ...string) ([]*ast.File, error)

ParseGoDir parses the non-test Go files in dir that the default build context, plus any tags given, would compile, in name order. A file excluded by a build constraint or a GOOS/GOARCH suffix is skipped, as `go build` skips it.

func Problems

func Problems(out io.Writer, what string, problems []string) error

Problems reports a list of problems as one failure, each on its own line through out, and nil when there are none. what names the thing that has them.

func WriteFileAtomic

func WriteFileAtomic(path string, data []byte) error

WriteFileAtomic writes through a temporary file in the same directory and renames it into place, so a failure half-way leaves the old file as it was.

Types

This section is empty.

Jump to

Keyboard shortcuts

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