함수형 언어/Elixir

Elixir 소스파일 전반부의 정리

manywaypark 2020. 2. 27. 18:53

module을 정의할 때 attribute, directive 등의 순서는 아래와 같이 정리하면 좋다.

@moduledoc
@behaviour
use
import
alias
require
@module_attribute
defstruct
@type
@callback
@macrocallback
@optional_callbacks

 

ref: https://github.com/christopheradams/elixir_style_guide#module-attribute-ordering

 

christopheradams/elixir_style_guide

A community driven style guide for Elixir. Contribute to christopheradams/elixir_style_guide development by creating an account on GitHub.

github.com

happy hackin'