
samber/mo
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
🦄 모나드와 인기 있는 FP 추상화, Go 1.18+ 제네릭(옵션, 결과, 또는 등)으로 구동됩니다.
개요
- samber/ro: Go용 반응형 프로그래밍: 이벤트 기반 애플리케이션을 위한 선언적이고 컴포지션 가능한 API - samber/lo: Go 1.18+ 제네릭 기반의 Lodash 스타일 Go 라이브러리 - samber/do: Go 1.18+ Generics 기반의 의존성 주입 툴킷 - samber/cc-skills-golang: Golang용 AI 에이전트 기술 💖 후원: DBOS - Go용 내구성 있는 워크플로우 오케스트레이션 라이브러리 저는 이런 유틸리티 라이브러리가 정말 마음에 듭니다. 이 이름은 "Monad Go"와 비슷하며, 어떤 Go 패키지도 이 이름을 사용하지 않습니다. 현재 저희는 다음 데이터 유형을 지원합니다: - 옵션[T] (아마도) - 결과[T] - 한쪽[A, B] - EitherX[T1, ..., TX] (x가 3과 5 사이에 있을 때) - 미래[T] - IO[T] - IOEither[T] - Task[T] - TaskEither[T] - State[S, A] 이 라이브러리는 v1이며 SemVer를 엄격히 따릅니다. v2.0.0 이전에는 내보내진 API에 어떤 파괴적인 변경도 이루어지지 않습니다. 이 라이브러리는 Go 표준 라이브러리 외에는 의존성이 없습니다.
개요(AI 번역)
🦄 samber/mo는 모나드와 인기 있는 함수형 추상화를 Go 프로젝트에 도입합니다. [samber/mo는 최근 Go 1.18+ 제네릭을 사용합니다.
영감 출처:
- 스칼라
- 녹
- FP-TS
참고 항목:
- samber/ro: Go용 반응형 프로그래밍: 이벤트 기반 애플리케이션을 위한 선언적이고 컴포지션 가능한 API
- samber/lo: Go 1.18+ 제네릭스 기반의 Lodash 스타일 Go 라이브러리
- samber/do: Go 1.18+ 제네릭스 기반의 의존성 주입 툴킷
- samber/cc-skills-golang: 골랑용 AI 에이전트 기술
💖 후원:
DBOS - Go용 내구성 있는 워크플로우 오케스트레이션 라이브러리
왜 이 이름일까?
저는 이런 유틸리티 라이브러리에 짧은 이름을 쓰는 게 정말 마음에 듭니다. 이 이름은 "Monad Go"와 비슷하며, 어떤 Go 패키지도 이 이름을 사용하지 않습니다.
💡 특징
현재 저희는 다음 데이터 유형을 지원합니다:
Option[T](아마도)Result[T]Either[A, B]EitherX[T1, ..., TX](X가 3과 5 사이에 있을 때)Future[T]IO[T]IOEither[T]Task[T]TaskEither[T]State[S, A]
🚀 설치
이 라이브러리는 v1이며 SemVer를 엄격히 따릅니다.
v2.0.0 이전에는 내보내진 API에 어떤 파괴적인 변경도 이루어지지 않습니다.
이 라이브러리는 Go 표준 라이브러리 외에는 의존성이 없습니다.
💡 퀵 스타트
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
mo - Monads
🦄 samber/mo brings monads and popular FP abstractions to Go projects. samber/mo uses the recent Go 1.18+ Generics.
Inspired by:
- Scala
- Rust
- FP-TS
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/do: A dependency injection toolkit based on Go 1.18+ Generics
- samber/cc-skills-golang: AI Agent Skills for Golang
Why this name?
I love short name for such utility library. This name is similar to “Monad Go” and no Go package uses this name.
💡 Features
We currently support the following data types:
Option[T](Maybe)Result[T]Either[A, B]EitherX[T1, ..., TX](With X between 3 and 5)Future[T]IO[T]IOEither[T]Task[T]TaskEither[T]State[S, A]
🚀 Install
go get github.com/samber/mo@v1
# AI Agent Skill
npx skills add https://github.com/samber/cc-skills-golang --skill golang-samber-mo
This library is v1 and follows SemVer strictly.
No breaking changes will be made to exported APIs before v2.0.0.
This library has no dependencies except the Go std lib.
💡 Quick start
You can import mo using:
import (
"github.com/samber/mo"
)
Quick example using the option sub-package Pipe3 to compose transformations:
import (
"github.com/samber/mo"
"github.com/samber/mo/option"
)
out := option.Pipe3(
mo.Some(21),
option.Map(func(v int) int { return v * 2 }),
option.FlatMap(func(v int) mo.Option[int] { return mo.None[int]() }),
option.Map(func(v int) int { return v + 21 }),
)
// out == None[int]
Then use one of the helpers below:
추천 도구
다른 키워드를 입력하거나 필터를 제거해 보세요.
설치
npx skillfish add samber/mo