You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github.com/KScaesar/goutils

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/KScaesar/goutils

v0.0.0-20230205022734-9cf501246426
Source
Go
Version published
Created
Source

introduction

依據 clean 架構 及 ddd 的思想
放置開發 golang 常用的 技術元件

定義技術元件的抽象(interface),藉此隔離實作
且進行單元測試時, 不需要依賴外部 IO

定義抽象 同時可以將 開發程式的專注力
放在 領域知識 而不是 技術細節

focus package

  • database
  • errors
  • message

go test

go test ./... -trimpath -count 1 -tags integration

go test ./... -trimpath -count 1

context.Context 隱藏哪些技術元件

  • correlationID
  • logger
  • transaction object
    • *gorm.Tx
    • mongo.Session

FAQs

Package last updated on 05 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts