Skip to content

Commit

Permalink
Add @behaviour attribute to example modules (#1222)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth authored May 19, 2024
1 parent 0b58ea8 commit 1ff85b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/plug.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ defmodule Plug do
Here's an example of a module plug:
defmodule JSONHeaderPlug do
@behaviour Plug
import Plug.Conn
def init(opts) do
Expand Down Expand Up @@ -143,6 +145,8 @@ defmodule Plug do
## Example
defmodule Router do
@behaviour Plug
def init(opts), do: opts
def call(conn, opts) do
Expand Down

0 comments on commit 1ff85b7

Please sign in to comment.