Comments (4)
golang math 패키지에서 빅넘버 연산에 대한 코드인데.. 위에 제가 너무 길게 드린 복잡한 설명보다 좋은 예시가 될 것 같습니다.
<코드>
https://github.com/golang/go/blob/release-branch.go1.5/src/math/big/int.go#L405
<godoc을 이용한 documentation 결과>
https://godoc.org/math/big#Int
from it-chain.
Go 언어는 코멘트 규칙이 엄격하지 않더라구요. 문서화하고자 하는 함수/타입 위에 //
표시하면, 위의 예제처럼 그냥 평문으로 출력되는 형태인 것으로 보입니다. 권장하는 사항은 함수 이름이 getID
일 경우 주석은 // getID returns ID value ..blah blah
이런 식으로 문서화하고자 하는 함수/타입 이름으로 문서가 시작하게끔 하는 정도 인거 같습니다. 그리고 Export 되는 함수/타입들(대문자로 시작되는)은 반드시 코멘트 하는걸 권장하구요. 저희도 이정도부터 시작하면 좋은 출발이 될거 같습니다.
from it-chain.
@byron1st 님이 말씀하신대로 python과는 다르게 go는 함수 파라미터의 타입이 명시적으로 표기되어 있기 때문에 변수에 대한 설명보다는 대문자로 시작하는 즉 Export되는 변수 혹은 함수의 설명과 파일에 대한 전반적인 설명을 기준으로 하는것이 어떨까요?!!
from it-chain.
@byron1st @junbeomlee 두분 말씀처럼 필수적인 코멘트부터 시작하는 것이 좋을 것 같습니다! :)
그럼 제 숙제 auth쪽 작성해서 좋은 예시 만들어보겠습니다.. 하하;
from it-chain.
Related Issues (20)
- [doc] add docker mode
- [IPFS 연동] Add off-chain storage component
- [ivm] deploy from local file HOT 1
- [Avengers] library dependency conflict problem with avengers
- [Test] solo mode integration test scripts
- [Main] set ivm to use docker or normal mode when run it-chain HOT 1
- [blockchain] implementation of merkle tree
- [All] Need to add mutex lock to all repository implementations
- [Blockchain] Config Of Genesis
- [Blockchain] block sync http to grpc
- [Config] Port Number Overlap HOT 1
- [PBFT] ReceivePrevote / ReceivePreCommit log bug fix
- Modify state Api Testcase
- [PBFT] Leader doesn't save a consent block
- [PBFT] Consensus time out
- [PBFT] When multiple consensus requests are arrived, lock and process them in order.
- [PBFT] State repository load lock HOT 1
- LOGICAL-ARCHITECTURE-KR.md CQRS DOC IS NEEDED HOT 2
- [PBFT] Message pool modifying
- [Consensus] HandleStartConsensusCommand test 문의 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from it-chain.