common

package module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 0 Imported by: 0

README ¶

logo Common Module

Go Reference

🌱 Overview

The common module provides foundational shared utilities and reusable components used across the Entiqon ecosystem.

It promotes consistency, code reuse, and well-tested implementations for common development tasks.


🚀 Quick Start

go get github.com/entiqon/common

📦 Subpackages

Package Description
🧩 common/errors Structured error types with cause, reason, and process stage.
🧩 common/extension Type parsers, collections, and convenience shortcuts.
🧩 common/object Dynamic access and manipulation for maps and structs.
🧩 common/ptr Generic pointer utilities for working with optional values.
🧩 common/text String padding, truncation, and presentation utilities.

📄 License

MIT — © Entiqon Project

Documentation ¶

Overview ¶

Package common provides foundational shared utilities and reusable components used across the Entiqon ecosystem.

It promotes consistency, code reuse, and well-tested implementations for common development tasks.

Subpackages include:

  • errors: structured error types with cause, reason, and process stage.
  • extension: type parsers, collections, and convenience shortcuts.
  • object: dynamic access and manipulation for maps and structs.
  • ptr: generic pointer utilities for working with optional values.
  • text: string padding, truncation, and presentation utilities.

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

This section is empty.

Types ¶

type ProcessStage ¶

type ProcessStage string

ProcessStage identifies a named stage or step in a multi-stage process.

It is a string alias type used to represent the various phases or checkpoints in a workflow or processing pipeline where errors or specific events may occur.

This type is designed to be flexible and extensible; developers can define additional custom stages by declaring new constants of this type as needed.

Example:

const (
    StageInit     ProcessStage = "Init"
    StageParse    ProcessStage = "Parse"
    StageValidate ProcessStage = "Validate"
    StageExecute  ProcessStage = "Execute"
    StageFinalize ProcessStage = "Finalize"
)

Custom stages can be added in user code:

const StageCustom ProcessStage = "CustomStage"
const (
	// StageInit represents the initialization stage.
	StageInit ProcessStage = "Init"

	// StageParse represents the parsing stage.
	StageParse ProcessStage = "Parse"

	// StageValidate represents the validation stage.
	StageValidate ProcessStage = "Validate"

	// StageExecute represents the execution stage.
	StageExecute ProcessStage = "Execute"

	// StageFinalize represents the finalization stage.
	StageFinalize ProcessStage = "Finalize"
)

Predefined common stages in the processing lifecycle.

Directories ¶

Path Synopsis
Package errors provides extended error handling utilities for Entiqon.
Package errors provides extended error handling utilities for Entiqon.
Package extension provides strongly typed parsers and helpers for primitive and structured values.
Package extension provides strongly typed parsers and helpers for primitive and structured values.
boolean
Package boolean provides utilities for parsing and formatting boolean values.
Package boolean provides utilities for parsing and formatting boolean values.
collection
Package collection provides a generic, type-safe container for values.
Package collection provides a generic, type-safe container for values.
date
Package date provides utilities to parse and format time.Time values.
Package date provides utilities to parse and format time.Time values.
decimal
Package decimal provides utilities to parse values into float64 with optional rounding.
Package decimal provides utilities to parse values into float64 with optional rounding.
float
Package float provides utilities to parse values into float64.
Package float provides utilities to parse values into float64.
integer
Package integer provides parsing utilities to convert values into int.
Package integer provides parsing utilities to convert values into int.
number
Package number provides utilities for parsing numeric values into int with optional rounding.
Package number provides utilities for parsing numeric values into int with optional rounding.
Package object provides utilities for dynamic access and manipulation of heterogeneous objects using reflection.
Package object provides utilities for dynamic access and manipulation of heterogeneous objects using reflection.
Package ptr provides generic helpers for working with pointers.
Package ptr provides generic helpers for working with pointers.
Package text provides common utilities for working with strings.
Package text provides common utilities for working with strings.

Jump to

Keyboard shortcuts

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