Golang의 private interface를 활용한 의존성 주입
구조체 초기화 시점에 의존성이 주입되는 경우
특정 메서드가 외부패키지인 billingService에 의존적인 구조
Bill 구조체는 선언 시점에 billingService를 주입받아야 하기 때문에, billingService에 의존적인 구조를 갖게됨
type Bill struct {
price int
productName string
billingService billi...
tricolor-ilsan-kim.com2 min read