Computer Vision :)

  • 홈
  • 태그
  • 방명록

go 개발 1

[개발팁] Golang을 사용해서 개발한다면 대소문자에 유의하자...

Golang으로 개발하면서 구조체의 멤버 변수를 만들 때 아무 생각 없이 소문자로 만들었다가 반나절 시간을 허비하고 말았다... Private vs Public members 만일 내가 작성한 구조체가 Exported 될 일이(외부에서 접근) 있는 멤버 변수가 있다면 이를 소문자로 작성하면 안된다. 왜냐하면 소문자로 만들 경우 private member variable이 되기 때문에 접근이 불가능해진다. 따라서! 외부에서 쓰일 멤버 변수는 가장 앞 글자를 대문자로 작성하자!!! The rule is simple, if an identifier is capitalized it will be exported. This manifests itself in golang when converting a struc..

Programming/Go 2020.08.11
1
더보기
  • 분류 전체보기 (27)
    • Deep Learning (21)
      • Object Detection (4)
      • Pytorch (7)
      • Speech Synthesis (4)
      • OCR (6)
    • Algorithm (1)
      • 자료구조 (1)
    • Programming (2)
      • Go (2)
    • Machine Learning (3)
      • Theory (3)

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바