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
- func Clip(s string, n int) string
- func Floor(what string, read, min int) []string
- func MarkdownSection(text, heading string) (section string, ok bool)
- func ParseGoDir(fset *token.FileSet, dir string, mode parser.Mode, tags ...string) ([]*ast.File, error)
- func Problems(out io.Writer, what string, problems []string) error
- func WriteFileAtomic(path string, data []byte) error
Constants ¶
const ( // ModulePath is this module, as go.mod declares it. ModulePath = "github.com/mmedum/gitlab-mcp" // 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 ¶
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 ¶
Floor is a problem when read is below min: zero findings and zero inputs are otherwise the same output.
func MarkdownSection ¶
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 ¶
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 ¶
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.