MCPcopy Create free account
hub / github.com/diillson/chatcli / defaultIfEmpty

Function defaultIfEmpty

cli/channel_command.go:270–275  ·  view source on GitHub ↗

defaultIfEmpty mirrors the JS-style fallback so columns stay dense in the rules table.

(s, fallback string)

Source from the content-addressed store, hash-verified

268// defaultIfEmpty mirrors the JS-style fallback so columns stay
269// dense in the rules table.
270func defaultIfEmpty(s, fallback string) string {
271 if strings.TrimSpace(s) == "" {
272 return fallback
273 }
274 return s
275}
276
277func (cli *ChatCLI) getChannelSuggestions(d prompt.Document) []prompt.Suggest {
278 suggestions := []prompt.Suggest{

Callers 1

runChannelRulesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected