RestoreAssets

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MIT Imports: 4 Imported by: 0

README

RestoreAssets CI

A simple library to restore Go assets from "embed" module

Why?

Coming from go-bindata, it's not so easy to restore assets from "embed" module, since doesn't provide the go-bindata function RestoreAssets.

This library tries to solve this problem.

Usage

package main

import (
    "github.com/ChromeTemp/RestoreAssets"
    "embed"
)

//go:embed assets/*
var assets embed.FS

func main() {
    // Restore all assets to "app_data" directory
    RestoreAssets.From(&assets, "app_data")
}

Note: this only works for folders embedded with "embed" module and not for files.


Copyright (c) 2022 ChromeTemp, released under the MIT License

ChromeTemp by Giorgio Bellisario

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From(fs *embed.FS, outDir string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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