Documentation
¶
Overview ¶
Package cmd wires the cobra command tree for codearts-cli.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractStringFromResp ¶ added in v0.2.0
ExtractStringFromResp tries to pull a named field out of the standard Huawei envelope: {"result": [{"id": "..."}]} or {"result": {"id": "..."}}.
func FirstNonEmpty ¶ added in v0.2.0
FirstNonEmpty returns the value of the first non-empty input (inline JSON or file). It errors when both are supplied simultaneously for the same logical input.
func ParseRepoID ¶ added in v0.2.0
ParseRepoID rejects anything that isn't a pure positive integer (no hex, no leading signs, no whitespace). Earlier this used fmt.Sscanf which silently truncated UUIDs to their leading digit run — e.g. the UUID "759278ab..." quietly parsed as 759278. That would quietly send the request to the wrong repository, so we reject non-numeric input up-front.
Types ¶
This section is empty.