getter

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package getter.

Code copied from: https://github.com/facebookarchive/symwalk/blob/42004b9f322246749dd73ad71008b1f3160c0052/walk.go#L12-L45 BSD License

For symwalk software

Copyright (c) 2015, Facebook, Inc. All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(ctx context.Context, src, dst string) error

Download downloads data from a given source to local file system under a given destination path.

func EnsureDownloaded

func EnsureDownloaded(ctx context.Context, templateSources []Source, dir string) error

EnsureDownloaded downloads given sources only if not yet downloaded. It's a weak comparison based on the source path.

func Load

func Load[T any](ctx context.Context, tmpDir string, templateSources []Source) ([]T, error)

Load downloads defined sources and read them from the FS.

func Walk

func Walk(path string, walkFn fs.WalkDirFunc) error

Walk extends filepath.Walk to also follow symlinks

Types

type Source

type Source struct {
	Ref string `yaml:"ref"`
}

Source holds information about source location.

Jump to

Keyboard shortcuts

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