🍺 BREW Explorer

← all formulae

go-rice

brew install go-rice v1.0.3 BSD-2-Clause

Easily embed resources like HTML, JS, CSS, images, and templates in Go

11
30-day installs · #8373
13
90-day · #11012
129
365-day · #8519
2.4k
★ GitHub stars · updated 3y ago

Build dependencies

go

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "go"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Easily embed resources like HTML, JS, CSS, images, and templates in Go",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:15+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "go-rice",
  "github_default_branch": "master",
  "github_last_commit_at": "2022-11-16T19:08:28Z",
  "github_readme_excerpt": "# go.rice\n\n[![Build Status](https://travis-ci.org/GeertJohan/go.rice.png)](https://travis-ci.org/GeertJohan/go.rice)\n[![Godoc](https://img.shields.io/badge/godoc-go.rice-blue.svg?style=flat-square)](https://godoc.org/github.com/GeertJohan/go.rice)\n\ngo.rice is a [Go](http://golang.org) package that makes working with resources such as html,js,css,images and templates easy. During development `go.rice` will load required files directly from disk. Upon deployment it\u0027s easy to add all resource files to a executable using the `rice` tool, without changing the source code for your package. go.rice provides methods to add resources to a binary in different scenarios.\n\n## What does it do\n\nThe first thing go.rice does is finding the correct absolute path for your resource files. Say you are executing a binary in your home directory, but your `html-files` are in `$GOPATH/src/yourApplication/html-files`. `go.rice` will lookup the correct path for that directory (relative to the location of yourApplication). All you have to do is include the resources using `rice.FindBox(\"html-files\")`.\n\nThis works fine when the source is available to the machine executing the binary, which is the case when installing the executable with `go get` or `go install`. But it does not work when you wish to provide a single binary without source. This is where the `rice` tool comes in. It analyses source code and finds call\u0027s to `rice.FindBox(..)`. Then it adds the required directories to the executable binary, There are two strategies to do this. You can \u0027embed\u0027 the assets by generating go source code and then compile them into the executable binary, or you can \u0027append\u0027 the assets to the executable binary after compiling. In both cases the `rice.FindBox(..)` call detects the embedded or appended resources and load those, instead of looking up files from disk.\n\n## Installation\n\nUse `go install` to install the package the `rice` tool.\n\n```bash\ngo install github.com/GeertJohan/go.rice@latest\ngo install ",
  "github_repo": "GeertJohan/go.rice",
  "github_stars": 2442,
  "github_topics": [],
  "homepage": "https://github.com/GeertJohan/go.rice",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 11,
  "installs_365d": 129,
  "installs_90d": 13,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "BSD-2-Clause",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "go-rice",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 8373,
  "rank_365d": 8519,
  "rank_90d": 11012,
  "raw_hash": "76aab7033b6eb750",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/g/go-rice.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "go"
  ],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "1.0.3",
  "versioned_formulae": [],
  "why_use_this": null
}