Documentation ¶
Index ¶
- func CheckPathExists(path string) error
- func CleanupDownloadedDir() error
- func CompileFromLocal(path string) (map[string]cue.Value, error)
- func CompileFromURL(client *github.Client, u *url.URL) (map[string]cue.Value, error)
- func CreateGitHubClient(token string) *github.Client
- func ExtractPackageName(content []byte) (string, error)
- func FetchFromGitHub(urlStr string) (*github.RepositoryContent, []*github.RepositoryContent, error)
- func IsURL(s string) bool
- func ProcessInputs(inputs []string) ([]string, error)
- func ReadFile(content string) ([]byte, error)
- func StartSpinner(msg string) *spinner.Spinner
- func TempDirWithCleanup() (dirPath string, cleanupFunc func(), err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPathExists ¶
func CleanupDownloadedDir ¶
func CleanupDownloadedDir() error
func CompileFromLocal ¶
compileFromLocal processes either a single file or all files in a directory.
func CompileFromURL ¶
compileFromURL parses the Github URL, reads the contents and compiles it to Cue Value
func CreateGitHubClient ¶
func ExtractPackageName ¶
func FetchFromGitHub ¶
func FetchFromGitHub(urlStr string) (*github.RepositoryContent, []*github.RepositoryContent, error)
func ProcessInputs ¶
ProcessInputs processes the CLI args, fetches content from URLs if needed, and returns a slice of filenames.
func ReadFile ¶
ReadFile reads the files provided from cli args and returns []byte and an error if any
func StartSpinner ¶
StartSpinner starts a spinner with the given message.
func TempDirWithCleanup ¶
TempDirWithCleanup creates a temporary directory and returns its path along with a cleanup function.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.