{"id":37985003,"url":"https://github.com/pierods/embedder","last_synced_at":"2026-01-16T18:38:22.502Z","repository":{"id":57551055,"uuid":"96765642","full_name":"pierods/embedder","owner":"pierods","description":"Embedder is a function/command to embed resources in Go source files","archived":false,"fork":false,"pushed_at":"2017-07-10T14:10:34.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T00:35:40.361Z","etag":null,"topics":["asset","binary-data","embed","go","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pierods.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-10T10:33:25.000Z","updated_at":"2024-01-10T15:49:05.000Z","dependencies_parsed_at":"2022-09-26T18:41:18.910Z","dependency_job_id":null,"html_url":"https://github.com/pierods/embedder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pierods/embedder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierods%2Fembedder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierods%2Fembedder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierods%2Fembedder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierods%2Fembedder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pierods","download_url":"https://codeload.github.com/pierods/embedder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pierods%2Fembedder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481016,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asset","binary-data","embed","go","golang"],"created_at":"2026-01-16T18:38:22.410Z","updated_at":"2026-01-16T18:38:22.484Z","avatar_url":"https://github.com/pierods.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# embedder\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![](https://godoc.org/github.com/pierods/embedder?status.svg)](http://godoc.org/github.com/pierods/embedder)\n[![Go Report Card](https://goreportcard.com/badge/github.com/pierods/embedder)](https://goreportcard.com/report/github.com/pierods/embedder)\n[![Build Status](https://travis-ci.org/pierods/embedder.svg?branch=master)](https://travis-ci.org/pierods/embedder)\n\nEmbedder  is a function/command line utility to embed a binary or non-binary resource into a Go package.\n\n## Usage\nAs a library:\n\n```Go\n    hW := []byte(\"hello, world\")\n    \n    embedded, err := Embed(\"AssetVar\", hW)\n    if err != nil {\n        t.Fatal(err)\n    }\n    embedded = append([]byte(\"package mypackage \\n\"), embedded...)\n    if err != nil {\n        ...\n    }\n    ioutil.WriteFile(\"MyEmbeddedAsset.go\", embedded, os.ModePerm)\n    ...\n\n\t\n```\n\nAs a command-line utility:\n```Go\n    embed -package mypackage -var MyImageGif -asset myImage.gif \u003e MyEmbeddedAsset.go\n```\n\nIn go:generate:\n\n```Go\n//go:generate  embed -package mypackage -var MyImageGif -asset myImage.gif -o MyEmbeddedAsset.go \n```\n\n## Installation:\n\n```Go\n    go get github.com/pierods/embedder\n    cd %GOPATH/src/github.com/pierods/embedder/embed\n    go install\n```\n\n## Why not go-binddata, statik etc \n\ngo-bindata: 47 issues, compiles with Makefile\n\nstatik: it creates a statikFS fileserver - I don't need a fileserver\n\nrice: it crates an HTTPBox - I don't need a box.\n\netc.\n\nEmbedder does one thing and does it well - embedding resources. You can then wrap the embedded resource in a file server or whatever.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierods%2Fembedder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpierods%2Fembedder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpierods%2Fembedder/lists"}