golibs

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Unlicense

README

Build Status Code Coverage Go Report Card GolangCI Go Doc

golibs

This repository contains several useful functions and interfaces for Go:

  • Cache - in-memory cache with LRU, limits and statistics
  • Log - logger with configurable log-level on top of standard "log"
  • File:
    • safe file writing
  • Utils:
    • hostname validator

Cache

A quick example:

conf := cache.Config{}
conf.EnableLRU = true
c := cache.New(conf)
c.Set([]byte("key"), []byte("value"))
val := c.Get([]byte("key"))

Directories

Path Synopsis
internal
tools module

Jump to

Keyboard shortcuts

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