MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / AddInputChar

Method AddInputChar

internal/tui/branch_warning.go:201–207  ·  view source on GitHub ↗

AddInputChar adds a character to the branch name.

(ch rune)

Source from the content-addressed store, hash-verified

199
200// AddInputChar adds a character to the branch name.
201func (b *BranchWarning) AddInputChar(ch rune) {
202 // Only allow valid git branch name characters
203 if (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') ||
204 (ch >= '0' && ch <= '9') || ch == '-' || ch == '_' || ch == '/' {
205 b.branchName += string(ch)
206 }
207}
208
209// DeleteInputChar removes the last character from the branch name.
210func (b *BranchWarning) DeleteInputChar() {

Callers 1

Calls

no outgoing calls

Tested by 1