nameutil

package
v0.6.8 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Root = "pkg"

Root is the project layout root stripped from every name so the category stays visible (services/db/manager, routers/user/router). Projects with a different layout may override or clear it.

Functions

func Name

func Name(obj any, strip ...string) string

Name returns obj's service name: its package dir relative to the project root, with Root stripped, joined with the type name (pkg/services/db + manager -> services/db/manager). Optional prefixes are stripped after Root, whole segments only, first match wins - Name(m, "services") turns services/db/manager into db/manager.

Types

This section is empty.

Jump to

Keyboard shortcuts

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