gobox_utils

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2025 License: MIT Imports: 7 Imported by: 0

README

gobox

Handy Go tools and snippets I use across multiple projects — extracted, cleaned up, and shared.

gh workflow run "Go Test & Versioning" -f release_type=minor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchRepoFolders

func FetchRepoFolders(opts GitFetchOptions) error

FetchRepoFolders fetches and downloads specified folders from a GitHub repo

Types

type FileNode

type FileNode struct {
	Name     string      `json:"name"`
	IsDir    bool        `json:"isDir"`
	Children []*FileNode `json:"children,omitempty"` // pointer slice to do add comments
}

func DirToJSON

func DirToJSON(root string) (*FileNode, error)

type GitFetchOptions

type GitFetchOptions struct {
	RepoURL         string
	Branch          string
	DestinationPath string
	Folders         []string
	PullOnlyFolders bool
	Overwrite       bool
	OnProgress      ProgressHandler
}

GitFetchOptions defines options for fetching a GitHub repository

type ProgressHandler

type ProgressHandler func(progress int, message string)

Jump to

Keyboard shortcuts

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