MCPcopy Index your code
hub / github.com/larksuite/cli / AddTips

Function AddTips

internal/cmdutil/tips.go:27–30  ·  view source on GitHub ↗

AddTips appends tips to a command (merges with existing).

(cmd *cobra.Command, tips ...string)

Source from the content-addressed store, hash-verified

25
26// AddTips appends tips to a command (merges with existing).
27func AddTips(cmd *cobra.Command, tips ...string) {
28 existing := GetTips(cmd)
29 SetTips(cmd, append(existing, tips...))
30}
31
32// GetTips retrieves the tips from a command's annotations.
33func GetTips(cmd *cobra.Command) []string {

Callers 2

TestAddTipsFunction · 0.85
TestAddTipsToEmptyFunction · 0.85

Calls 2

GetTipsFunction · 0.85
SetTipsFunction · 0.85

Tested by 2

TestAddTipsFunction · 0.68
TestAddTipsToEmptyFunction · 0.68