golibs

module
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 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
  • JSON:
    • JSON format helper functions
  • 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
Package cache provides a simple LRU cache implementation
Package cache provides a simple LRU cache implementation
Package file provides helper functions for working with files
Package file provides helper functions for working with files
Package jsonutil provides some helper functions for working with JSON objects
Package jsonutil provides some helper functions for working with JSON objects
Package log contains necessary logging functions
Package log contains necessary logging functions
Package utils provides simple helper functions that are used in AdGuard projects
Package utils provides simple helper functions that are used in AdGuard projects

Jump to

Keyboard shortcuts

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