# Go Design Patterns (Go) > Singleton, Factory, Builder, Strategy, Decorator, Adapter, functional options, SOLID - 24 면접 질문 - Senior - [면접 질문: Go](https://sharpskill.dev/ko/technologies/go/interview-questions.md) ## 1. Go에서 Functional Options pattern의 주요 장점은 무엇입니까? **답변** Functional Options pattern을 사용하면 생성자를 오버로딩하지 않고도 선택적 파라미터를 가진 구성 가능한 API를 만들 수 있습니다. 서로 다른 시그니처를 가진 여러 생성자를 피하고 확장 가능하며 읽기 쉬운 API를 제공합니다. 이 pattern은 first-class function을 활용하고 모호한 기본값을 피하기 때문에 Go에서 관용적입니다. ## 2. Go에서 Singleton pattern을 구현할 때 권장되는 접근 방식은 무엇입니까? **답변** Go에서 Singleton pattern은 thread-safe하고 lazy initialization을 보장하는 sync.Once를 사용하여 구현하는 것이 이상적입니다. 이 접근 방식은 오류가 발생하기 쉬운 수동 mutex와 double-checked locking을 피합니다. sync.Once는 여러 goroutine이 동시에 실행되더라도 함수가 단 한 번만 실행되도록 보장합니다. ## 3. Go에서 interface 사용을 장려하는 SOLID 원칙은 무엇입니까? **답변** Dependency Inversion 원칙은 상위 수준 모듈이 하위 수준 모듈이 아니라 추상화(interface)에 의존해야 한다고 명시합니다. Go에서는 이것이 interface를 받아들이고 구체 타입을 반환하는 것으로 나타납니다. 이 원칙은 테스트(mocking), 결합도 완화, 코드 유지보수성을 용이하게 합니다. ## 21개 추가 질문 이용 가능 - Go에서 Factory pattern을 관용적으로 구현하려면 어떻게 해야 합니까? - Adapter pattern의 주요 역할은 무엇입니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Go 면접 주제 - [Go 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/go-basics.md): 25개 질문, Junior - [Go 데이터 구조](https://sharpskill.dev/ko/technologies/go/interview-questions/go-data-structures.md): 20개 질문, Junior - [Go 인터페이스](https://sharpskill.dev/ko/technologies/go/interview-questions/go-interfaces.md): 18개 질문, Junior - [에러 처리](https://sharpskill.dev/ko/technologies/go/interview-questions/error-handling.md): 20개 질문, Junior - [Goroutine 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/goroutines-basics.md): 20개 질문, Junior - [Channels](https://sharpskill.dev/ko/technologies/go/interview-questions/channels.md): 22개 질문, Junior - [Go Modules](https://sharpskill.dev/ko/technologies/go/interview-questions/go-modules.md): 18개 질문, Mid-Level - [HTTP 서버](https://sharpskill.dev/ko/technologies/go/interview-questions/http-server.md): 24개 질문, Mid-Level - [HTTP 클라이언트](https://sharpskill.dev/ko/technologies/go/interview-questions/http-client.md): 18개 질문, Mid-Level - [JSON 인코딩](https://sharpskill.dev/ko/technologies/go/interview-questions/json-encoding.md): 20개 질문, Mid-Level - [Database/SQL](https://sharpskill.dev/ko/technologies/go/interview-questions/database-sql.md): 22개 질문, Mid-Level - [context 패키지](https://sharpskill.dev/ko/technologies/go/interview-questions/context-package.md): 20개 질문, Mid-Level - [Testing](https://sharpskill.dev/ko/technologies/go/interview-questions/testing.md): 22개 질문, Mid-Level - [동시성 패턴](https://sharpskill.dev/ko/technologies/go/interview-questions/concurrency-patterns.md): 24개 질문, Mid-Level - [동기화 프리미티브](https://sharpskill.dev/ko/technologies/go/interview-questions/sync-primitives.md): 22개 질문, Mid-Level - [Go 웹 프레임워크](https://sharpskill.dev/ko/technologies/go/interview-questions/go-web-frameworks.md): 20개 질문, Mid-Level - [REST API 설계](https://sharpskill.dev/ko/technologies/go/interview-questions/rest-api-design.md): 20개 질문, Mid-Level - [gRPC](https://sharpskill.dev/ko/technologies/go/interview-questions/grpc.md): 22개 질문, Mid-Level - [Reflection](https://sharpskill.dev/ko/technologies/go/interview-questions/reflection.md): 20개 질문, Senior - [메모리 관리](https://sharpskill.dev/ko/technologies/go/interview-questions/memory-management.md): 24개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/go/interview-questions/performance-optimization.md): 22개 질문, Senior - [Generics](https://sharpskill.dev/ko/technologies/go/interview-questions/generics.md): 20개 질문, Senior - [Microservices](https://sharpskill.dev/ko/technologies/go/interview-questions/microservices.md): 24개 질문, Senior - [보안 및 인증](https://sharpskill.dev/ko/technologies/go/interview-questions/security-authentication.md): 24개 질문, Senior - [Docker & Containerization](https://sharpskill.dev/ko/technologies/go/interview-questions/docker-containerization.md): 20개 질문, Senior - [Kubernetes Basics](https://sharpskill.dev/ko/technologies/go/interview-questions/kubernetes-basics.md): 22개 질문, Senior - [고급 Go](https://sharpskill.dev/ko/technologies/go/interview-questions/advanced-go.md): 20개 질문, Senior - [CLI 개발](https://sharpskill.dev/ko/technologies/go/interview-questions/cli-development.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/go/interview-questions/design-patterns