golibs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: Apache-2.0, Apache-2.0 Imports: 0 Imported by: 0

README

CILicense

golibs

The repository contains utility code that can be used by applications written in Golang. Can be called 'common utils'.

Intention

In many services, we use the same things to instrument and support them, e.g., logging, context management, transformations, syncs, etc. We collect them in one place to avoid copy-paste and form a common place for the code that multiple services can use.

Rules

  • the folders in the root have names of the class of objects or the functionality it works with: contexts, sync, logging etc.
  • all commits should be reviewed.
  • changes in the utilities should be incremental and backward compatible. Use a new name/package path if you add functionality incompatible with the existing one.

License

This project is licensed under the Apache Version 2.0 License - see the LICENSE file for details

Acknowledgments

  • GoLand IDE by JetBrains is used for the code development

Documentation

Overview

golibs library

golibs library

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Once

type Once struct {
	// contains filtered or unexported fields
}

Once is a single-thread version of sync.Once

func (*Once) Do

func (o *Once) Do(f func())

Do calls the func f() only once. Must be NOT used in mutliple go-routines

type Reseter

type Reseter interface {
	// Reset allows to reset the object to the initial state. Result may
	// indicate about an error during the reset.
	Reset() error
}

Reseter is the interface that wraps the Reset method.

Some implementations may support reset mechanism, which allows to reset an object to its initial state. The objects may be considered resetable if they support this interface.

Directories

Path Synopsis
package cast
package cast
package chans
package chans
package config
package config
bytes
package bytes
package bytes
lru

Jump to

Keyboard shortcuts

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