code

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdCode

func NewCmdCode(f *cmdutil.Factory, runF func(*CodeOptions) error) *cobra.Command

Types

type CodeOptions

type CodeOptions struct {
	HttpClient func() (*http.Client, error)
	IO         *iostreams.IOStreams

	Query     string
	Workspace string
	Repo      string
	Limit     int
}

type CodeSearchResult

type CodeSearchResult struct {
	Type         string   `json:"type"`
	ContentMatch string   `json:"content_match"`
	PathMatches  []string `json:"path_matches"`
	File         struct {
		Path  string `json:"path"`
		Type  string `json:"type"`
		Links struct {
			Self struct {
				Href string `json:"href"`
			} `json:"self"`
		} `json:"links"`
	} `json:"file"`
}

CodeSearchResult represents a code search result

type CodeSearchResults

type CodeSearchResults struct {
	Size              int                `json:"size"`
	Page              int                `json:"page"`
	PageLen           int                `json:"pagelen"`
	Next              string             `json:"next"`
	Previous          string             `json:"previous"`
	Values            []CodeSearchResult `json:"values"`
	SearchQuery       string             `json:"search_query"`
	QuerySubstitution string             `json:"query_substitution"`
}

CodeSearchResults represents a paginated list of code search results

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL