Categorygithub.com/gizmo-ds/go-asset-bundle
repositorypackage
1.1.0
Repository: https://github.com/gizmo-ds/go-asset-bundle.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Go Asset Bundle

Go Report Card License

Just like asar 😂

Usage

go get -u github.com/gizmo-ds/go-asset-bundle

Or install the CLI tools

go install github.com/gizmo-ds/go-asset-bundle/cmd/goab-cli@latest

Example

example

Create an AssetBundle

ab, _ := bundle.NewAssetBundle("./public.ab")
defer ab.Close()

var version uint16 = 1000
ab.Bundle("./public", version)

Or use the CLI tool

goab-cli pack -o="./public.ab" -v=1000 ./public

Use an AssetBundle

ab, _ := bundle.OpenAssetBundle("./public.ab")
defer ab.Close()

fmt.Println("Version", ab.Version)

http.Handle("/", http.StripPrefix("/", http.FileServer(ab)))
addr := fmt.Sprintf("127.0.0.1:%d", 3000)
fmt.Println("http server started on", addr)
http.ListenAndServe(addr, nil)

Thanks

Thanks to JetBrains for the open source license(s).

JetBrains Logo

License

Code is distributed under MIT license, feel free to use it in your proprietary projects as well.