MCPcopy Index your code
hub / github.com/github/git-sizer / splitKey

Function splitKey

internal/refopts/ref_group_builder.go:153–159  ·  view source on GitHub ↗

splitKey splits `key`, which is part of a gitconfig key, into the refgroup symbol to which it applies and the field name within that section.

(key string)

Source from the content-addressed store, hash-verified

151// refgroup symbol to which it applies and the field name within that
152// section.
153func splitKey(key string) (sizes.RefGroupSymbol, string) {
154 i := strings.LastIndexByte(key, '.')
155 if i == -1 {
156 return "", key
157 }
158 return sizes.RefGroupSymbol(key[:i]), key[i+1:]
159}
160
161// AddRefopts adds the reference-related options to `flags`.
162func (rgb *RefGroupBuilder) AddRefopts(flags *pflag.FlagSet) {

Callers 2

fillInTreeMethod · 0.85

Calls 1

RefGroupSymbolTypeAlias · 0.92

Tested by

no test coverage detected