Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

코드 포멧팅 제안 #108

Open
byron1st opened this issue Mar 12, 2018 · 1 comment
Open

코드 포멧팅 제안 #108

byron1st opened this issue Mar 12, 2018 · 1 comment
Assignees
Labels

Comments

@byron1st
Copy link
Collaborator

Go에는 goimports 라고 자동으로 포멧팅(임포트 순서, 띄어쓰기 등)을 수행해주는 기본 도구가 있는데요, 코드 작성시 이걸 사용하는게 어떤지요? 이유는 다음과 같습니다.

  • merge 시 임포트 순서 같은 사소한 포멧팅 이슈로 인한 충돌 발생 방지
  • Visual Studio Code, Atom, GoLand 같은 다양한 개발 툴과 무관하게 포멧팅 유지

Visual Studio Code (go-vscode)와 Atom (go-plus)의 경우 goreturns 라는 도구를 default로 사용하고 있습니다. goreturnsgoimports 에 리턴 시 기본값 자동 배정 기능만 추가된 것이라 포멧팅 측면에선 goimports 와 사실상 동일하다고 볼 수 있죠.

다만 GoLand의 경우 추가적으로 설정을 해주어야 하는데, 이 링크를 참고하시면 설정이 가능합니다.

의견 주세요~!

@junbeomlee
Copy link
Member

사용해보니 저장하면 바로 자동으로 import 포맷을 세팅해주니 좋을 것 같습니다.
설치완료했습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants