Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #783 from raspbeep/switch-bindata-assets
CONSOLE-3438: Switch to using assets
- Loading branch information
Showing
33 changed files
with
54 additions
and
1,170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package bindata | ||
|
||
import ( | ||
"embed" | ||
) | ||
|
||
//go:embed assets/* | ||
var f embed.FS | ||
|
||
// Asset reads and returns the content of the named file. | ||
func Asset(name string) ([]byte, error) { | ||
return f.ReadFile(name) | ||
} | ||
|
||
// MustAsset reads and returns the content of the named file or panics | ||
// if something went wrong. | ||
func MustAsset(name string) []byte { | ||
data, err := f.ReadFile(name) | ||
if err != nil { | ||
panic(err) | ||
} | ||
|
||
return data | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.