statik allows you to embed a directory of static files into your Go binary to be later served from an http.FileSystem. Is this a crazy idea? No, not necessarily. If you're building a tool that has a Web component, you typically want to serve some images, CSS and JavaScript. You like the comfort of distributing a single binary, so you don't want to mess with deploying them elsewhere. If your static files are not large in size and will be browsed by a few people, statik is the solution you are looking for. statik is a tiny program that reads a directory and generates a source file that contains its contents. The generated source file registers the directory contents to be used by statik file system. In your program, all your need to do is to import the generated package, initialize a new statik file system and serve.

Features

  • By default, statik includes the "last modified" (mtime) time on files that it packs
  • Allows an HTTP FileServer to present the correct file modification times to clients
  • You can also read the content of a single file
  • statik is a tiny program that reads a directory and generates a source file that contains its contents
  • The generated source file registers the directory contents to be used by statik file system
  • The command below will walk on the public path and generate a package called statik under the current working directory

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

Apache License V2.0

Follow statik

statik Web Site

Other Useful Business Software
Paessler: Easy to Use With Enterprise Power. Free Trial Icon
Paessler: Easy to Use With Enterprise Power. Free Trial

A low-code dashboard makes monitoring intuitive for any admin, while scripting and custom sensors give experts full control.

You shouldn't have to choose between a monitoring tool that's easy to use and one that's powerful enough for a complex environment. PRTG's low-code interface lets any admin build dashboards, set alerts and monitor devices without scripting, while custom sensors and full API access are there when your team needs deeper control. One platform, no compromise. Download a free 30-day trial now.
Get Free Download
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of statik!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-01-13