hzDocs
hzDocs
文章 / 文档hedzr.com首页

cmdr series

介绍 cmdr

Guide

你的首个 CLI app更适合工程实践的版本
循序渐进
基本概念
命令命令:执行外部程序命令:预设参数命令:重定向命令:动态命令清单命令:在配置文件中定义别名清单命令:事件响应函数标志标志:必须项标志:可翻转组标志:枚举值标志:`Head -1` 风格标志:调用外部工具获得输入标志:自动否定标志:加号 `+` 前缀标志:事件响应函数解析结果内建命令和标志帮助子系统可共享共存的 app 实例辨析顶级函数WithOptsBackstage
如何……
Auto-close the ClosersRead config into structUsing is DetectorsUsing Store

References

What's New
Packages

Others

Examples
Blueprint
产品发布
产品发布之前
介绍 cmdr-cxx

Guide

cmdr supports

Intro

Guide

More features

References

Others

evendeep(-go)

Guide

Usagesdeepcopydeepdiffdeepequal
logg/slog(-go)

Guide

Guide

others

Components
trie-cxx

Guide

Guide

links

On Github

evendeep(-go)

Colored logger in golang

Intro to evendeep

This is a standard deepcopy library. It provides per-field copying deeply, and compares deeply abilities.

This library is designed for making everything customizable.

Features

  • loosely and reasonable data-types conversions, acrossing primitives, composites and functions, with customizable converters/transformers
  • unexported values (optional), ...
  • circular references immunization
  • fully customizable
    • user-defined value/type converters/transformers
    • user-defined field to field name converting rule via struct Tag
  • easily apply different strategies
    • basic strategies are: copy-n-merge, clone,
    • strategies per struct field: slicecopy, slicemerge, mapcopy, mapmerge, omitempty (keep if source is zero or nil), omitnil, omitzero, keepneq (keep if not equal), cleareq (clear if equal), ...
  • copy fields by name or ordinal
    • field to field
    • field to method, method to field
    • value to function (as input), function result to value
    • slice[0] to struct, struct to slice[0]
    • struct to map, map to struct
    • User-defined extractor/getter on various source
    • User-defined setter for struct or map target (if mapkey is string)
    • ...
  • The deep series
    • deepcopy: DeepCopy(), or New()
    • deepclone:MakeClone()
    • deepequal: DeepEqual()
    • deepdiff: DeepDiff()
  • Compatibilities
    • Run for Go Modules and Generics enable, and log/slog present (go1.21+ since v1)
      • since v1, debug/buildinfo requires go1.18+, log/slog wants go1.21+.
      • for the v0.x versions, go1.11+ is okay.

History

  • More in CHANGELOG

Roadmap

These features had been planning but still on ice.

  • Name converting and mapping for cms.ByOrdinal (*) mode: a universal name converter can be applied in copying field to field.
  • Use SourceExtractor and TargetSetter together (might be impossible)
  • More builtin converters (might not be a requisite)
  • Handle circular pointer (DONE)

Issue me if you wanna put it or them on the table.

LICENSE

Apache 2.0

What is Next?

Components

Components

On Github

How is this guide?

最后更新于

目录

Intro to evendeep
Features
History
Roadmap
LICENSE