Coder Social home page Coder Social logo

오프라인에서 말씀드린 코멘트에 대한 제안인데 의견이 다를수도 있을것 같아서 등록합니다! about it-chain HOT 4 CLOSED

owljoa avatar owljoa commented on May 23, 2024
오프라인에서 말씀드린 코멘트에 대한 제안인데 의견이 다를수도 있을것 같아서 등록합니다!

from it-chain.

Comments (4)

owljoa avatar owljoa commented on May 23, 2024

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.

byron1st avatar byron1st commented on May 23, 2024

Go 언어는 코멘트 규칙이 엄격하지 않더라구요. 문서화하고자 하는 함수/타입 위에 // 표시하면, 위의 예제처럼 그냥 평문으로 출력되는 형태인 것으로 보입니다. 권장하는 사항은 함수 이름이 getID일 경우 주석은 // getID returns ID value ..blah blah 이런 식으로 문서화하고자 하는 함수/타입 이름으로 문서가 시작하게끔 하는 정도 인거 같습니다. 그리고 Export 되는 함수/타입들(대문자로 시작되는)은 반드시 코멘트 하는걸 권장하구요. 저희도 이정도부터 시작하면 좋은 출발이 될거 같습니다.

from it-chain.

junbeomlee avatar junbeomlee commented on May 23, 2024

@byron1st 님이 말씀하신대로 python과는 다르게 go는 함수 파라미터의 타입이 명시적으로 표기되어 있기 때문에 변수에 대한 설명보다는 대문자로 시작하는 즉 Export되는 변수 혹은 함수의 설명과 파일에 대한 전반적인 설명을 기준으로 하는것이 어떨까요?!!

from it-chain.

owljoa avatar owljoa commented on May 23, 2024

@byron1st @junbeomlee 두분 말씀처럼 필수적인 코멘트부터 시작하는 것이 좋을 것 같습니다! :)

그럼 제 숙제 auth쪽 작성해서 좋은 예시 만들어보겠습니다.. 하하;

from it-chain.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.