MCPcopy Create free account
hub / github.com/docker/docker-language-server / prefix

Function prefix

internal/compose/completion.go:129–140  ·  view source on GitHub ↗
(line string, character int)

Source from the content-addressed store, hash-verified

127var textEditModifiers = []textEditModifier{buildTargetModifier, serviceSuggestionModifier, serviceProviderModifier, serviceProviderTypeModifier}
128
129func prefix(line string, character int) string {
130 sb := strings.Builder{}
131 sb.Grow(character)
132 for i := range character {
133 if unicode.IsSpace(rune(line[i])) {
134 sb.Reset()
135 } else {
136 sb.WriteByte(line[i])
137 }
138 }
139 return sb.String()
140}
141
142func createSpacing(line string, character int, arrayAttributes bool) string {
143 if arrayAttributes {

Callers 1

CompletionFunction · 0.85

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected