elle

package module
v0.0.0-...-daa2d54 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: MIT Imports: 0 Imported by: 0

README

Elegant Low-Level Elements

Stars Badge Forks Badge Pull Requests Badge Issues Badge GitHub contributors License Badge

🧐 What is this?

elle (Elegant Low-Level Elements) is a lightweight Go library designed to simplify coding for me.

It provides a set of utilities and methods that make Go development faster and more efficient, especially for complex operations.

✨ Features

  • 🧼 Simple - Very simple syntax that makes coding fun
  • 🚀 Fast - Zero-overhead model to abstractions & any sugar in syntax
  • 🛡️ Secure - Built from the ground up to be cryptographically secure
  • Robust - Variety of use-cases and methods for all types of projects

📝 Example

package main

import (
	"time"

	"github.com/exact/elle/io"
	"github.com/exact/elle/random"
	"github.com/exact/elle/types"
)

// Create a global, synced pool that can be used anywhere
var pool = io.SyncPool(30)

func main() {
	// A zero-size, empty struct is included for efficiency
	test := make(chan types.None, 1)
	test <- types.None{}

	// Simulate a panicing function, it will recover automatically
	pool.Go(func() {
		time.Sleep(3 * time.Second)
		panic("something went horribly wrong!")
	})

	// Simulate a random amount of I/O work
	for i := range random.Number(25, 50) {
		pool.Go(func() {
			resp, err := io.Request("GET", "https://example.com/", nil, nil, true)
			if err != nil {
				io.Log.Warn("Request Failed", "thread", i)
			} else {
				io.Log.Info("Request Done", "thread", i, "resp", resp)
			}
		})
	}

	// Wait for all work to finish
	pool.Wait()
}
Made with 💜 by @exact

Documentation

Index

Constants

View Source
const Version string = "v0.0.2b"

Module-level version constant

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
example command

Jump to

Keyboard shortcuts

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