Registry / utility / gitleaks-go-gitdiff

gitleaks-go-gitdiff

JSON →
library0.9.1gogounverified

A Go library for parsing and working with git diffs.

go get github.com/gitleaks/go-gitdiff
INSTALL
IMPORT
SIG · GITLEAKS-GO-GITDIF
G
gitleaks-go-gitdiff
utilitygov0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gitdiff
github.com/gitleaks/go-gitdiff

Parse a git diff string and print the number of files changed.

package main import ( "fmt" "github.com/gitleaks/go-gitdiff/gitdiff" ) func main() { files, _, err := gitdiff.Parse("diff --git a/file.go b/file.go\nindex abc..def 100644\n--- a/file.go\n+++ b/file.go\n@@ -1 +1 @@\n-old\n+new\n") if err != nil { panic(err) } fmt.Println(len(files)) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.9.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
gitleaks-go-gitdiff — go get gitleaks-go-gitdiff · libregistry