CATCHV Blog

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

function option pattern 1

golang Functional Options Pattern

golang Functional Options Patternpackage servertype Server { host string port int timeout time.Duration maxConn int}func New(options ...func(*Server)) *Server { svr := &Server{} for _, o := range options { o(svr) } return svr}func (s *Server) Start() error { // todo}func WithHost(host string) func(*Server) { return func(s *Server) { s.host = host }}func WithPort(port int) func(*..

Dev/Go 2024.06.05
이전
1
다음
더보기
프로필사진

CATCHV Blog

Database & .NET

  • catchv blog (139)
    • Database (0)
      • MS SQL (42)
      • MySQL (18)
      • MariaDB (1)
      • DB2 (2)
      • Redis (1)
      • MongoDB (0)
      • Postgresql (3)
    • Dev (53)
      • flutter (10)
      • dotnet core (5)
      • elasticsearch (3)
      • Grafana (1)
      • Linux (10)
      • Windows (3)
      • Powershell (1)
      • C++ (1)
      • docker (3)
      • Go (16)
    • 기타 (16)
      • Windows Phone 7 (1)
      • Android (1)
      • IPhone (1)
      • MAC (8)

Tag

docker, PostgreSQL, 맥미니, go, mysql, SQL Server, log, DotNet, Linux, User, Flutter, Pattern, 맥 필수 프로그램, Android, golang, Mac, prompt_status, elasticSearch, vscode, AnimatedPositioned,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2026/02   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바