go-sfl

module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2026 License: MIT

README

Single-File libraries in Golang

Go Reference

A repository with libraries that can be easily copied into your project. One library - one file. Own the code.

Libraries

Name Version Description
csrf 0.0.1 Basic protection against CSRF attacks.
dotenv 0.0.1 .env file loader.
loadtmpl 0.0.1 HTML template loader.
syslog 0.0.1 Syslog wrapper that implements slog.Handler.

Installation

Option 1: web interface

Just copy the library file into your project. You can also copy the test files.

Option 2: command line tools

Download the library file:

curl https://raw.githubusercontent.com/ordinary-dev/go-sfl/refs/heads/master/$LIBRARY/$LIBRARY.go -o $LIBRARY.go

You can also copy the entire repository:

git clone https://github.com/ordinary-dev/go-sfl.git
Option 3: go modules

You can use the traditional way of installing dependencies in go.

go get github.com/ordinary-dev/go-sfl

Example:

import (
  "github.com/ordinary-dev/go-sfl/<LIBRARY>"
)

But do you need an extra dependency for such small tasks?

Acknowledgments

Insiped by nothings/stb.

Directories

Path Synopsis
CSRF protection.
CSRF protection.
example command
.env file loader.
.env file loader.
example command
HTML template loader.
HTML template loader.
example command
Syslog wrapper that implements slog.Handler.
Syslog wrapper that implements slog.Handler.
example command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL