Example Embed Static Files Go Save

The easiest way to embed static files into a binary file in your Golang app (no external dependencies).

Project README

Example for embed static files into a binary

This is full project structure example of article The easiest way to embed static files into a binary file in your Golang app (no external dependencies).

Published on Dev.to @ 31 Jan 2020.

Requirements

  • Go 1.11+
  • Go Modules

Usage

  • Clone this repository and go to folder:
git clone https://github.com/koddr/example-embed-static-files-go.git
cd example-embed-static-files-go
  • Install gosec (I recommend):
go get github.com/securego/gosec/cmd/gosec
  • Try to build binary:
make build
  • No errors? Let's run:
make run

result

  • That's all!

Author

Article assistance

If you want to say «thank you»:

  1. Twit about article on your Twitter.
  2. Add a GitHub Star and make Fork to this repository.
  3. Donate some money to project author via PayPal: @paypal.me/koddr or LiberaPay.
  4. Join DigitalOcean at our referral link (your profit is $100 and we get $25).

Thanks for your support! 😘

License

MIT

Open Source Agenda is not affiliated with "Example Embed Static Files Go" Project. README Source: koddr/example-embed-static-files-go

Open Source Agenda Badge

Open Source Agenda Rating