SD

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

2.8천 stars 품질 72 트렌드 47MIT

⚙️ Go 1.18+ 제네릭 기반의 의존성 주입 툴킷입니다.

개요

이 라이브러리는 의존성 주입 설계 패턴을 구현합니다. 훌륭한 uber/dig 패키지를 대체할 수 있습니다. samber/do는 Go 1.18+ 제네릭을 사용하여 타입 안전 API를 제공합니다. - samber/ro: Go용 반응형 프로그래밍: 이벤트 기반 애플리케이션을 위한 선언적이고 컴포즈블한 API - samber/lo: Go 1.18+ Generics 기반의 Lodash 스타일 Go 라이브러리 - samber/mo: Go 1.18+ Generics 기반 Monads (옵션, 결과, Either 등...) - samber/cc-skills-golang: Golang용 AI 에이전트 기술 💖 후원: DBOS - Go용 내구성 있는 워크플로우 오케스트레이션 라이브러리 이런 유틸리티 라이브러리 때문에 정말 마음에 듭니다. 이 이름은 DI와 Go의 합이며, 어떤 Go 패키지도 이 이름을 사용하지 않습니다.

개요(AI 번역)

** ⚙️ Go 1.18+ 제네릭 기반의 의존성 주입 툴킷.**

이 라이브러리는 의존성 주입 설계 패턴을 구현합니다. 훌륭한 uber/dig 패키지를 대체할 수 있습니다. samber/do는 Go 1.18+ 제네릭을 사용하여 타입 안전 API를 제공합니다.

참고 항목:

  • samber/ro: Go용 반응형 프로그래밍: 이벤트 기반 애플리케이션을 위한 선언적이고 컴포지션 가능한 API
  • samber/lo: Go 1.18+ 제네릭스 기반의 Lodash 스타일 Go 라이브러리
  • samber/mo: Go 1.18+ 제네릭 기반 모나드(옵션, 결과, Either…)
  • samber/cc-skills-golang: 골랑용 AI 에이전트 기술

💖 후원:

DBOS - Go용 내구성 있는 워크플로우 오케스트레이션 라이브러리


왜 이 이름일까?

저는 이런 유틸리티 라이브러리에 짧은 이름이 너무 좋습니다. 이 이름은 DI와 [Go의 합이며, 어떤 Go 패키지도 이 이름을 사용하지 않습니다.

💡 특징

  • ** 📒 서비스 등록**
  • 유형별 레지스터
  • 이름으로 등록하기
  • 패키지에서 여러 서비스를 동시에 등록하기
  • ** 🪃 봉사 인기구**
  • 이이지 로드
  • 레이지 로딩
  • 과도 부하
  • 태그 기반 호출
  • 순환 의존성 탐지
  • ** 🧙 ♂️ 서비스 앨리어싱**
  • 암묵적 (구조체 제공, 인터페이스를 호출)

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

do - Dependency Injection

⚙️ A dependency injection toolkit based on Go 1.18+ Generics.

This library implements the Dependency Injection design pattern. It may replace the fantastic uber/dig package. samber/do uses Go 1.18+ generics and therefore offers a type‑safe API.

See also:

  • samber/ro: Reactive Programming for Go: declarative and composable API for event-driven applications
  • samber/lo: A Lodash-style Go library based on Go 1.18+ Generics
  • samber/mo: Monads based on Go 1.18+ Generics (Option, Result, Either…)
  • samber/cc-skills-golang: AI Agent Skills for Golang


Why this name?

I love the short name for such a utility library. This name is the sum of DI and Go and no Go package uses this name.

💡 Features

  • 📒 Service registration
    • Register by type
    • Register by name
    • Register multiple services from a package at once
  • 🪃 Service invocation
    • Eager loading
    • Lazy loading
    • Transient loading
    • Tag-based invocation
    • Circular dependency detection
  • 🧙‍♂️ Service aliasing
    • Implicit (provide struct, invoke interface)
    • Explicit (provide struct, bind interface, invoke interface)
  • 🔁 Service lifecycle
    • Health check
    • Graceful unload (shutdown)
    • Dependency-aware parallel shutdown
    • Lifecycle hooks
  • 📦 Scope (a.k.a module) tree
    • Visibility control
    • Dependency grouping
  • 📤 Container
    • Dependency graph resolution and visualization
    • Default container
    • Container cloning
    • Service override
  • 🧪 Debugging & introspection
    • Explain APIs: scope tree and service dependencies
    • Web UI & HTTP middleware (std, Gin, Fiber, Echo, Chi)
  • 🌈 Lightweight, no dependencies
  • 🔅 No code generation
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add samber/do
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →