Move schema version definition to a macro.
authorSiraaj Khandkar <siraaj@khandkar.net>
Sun, 4 Oct 2015 05:50:01 +0000 (01:50 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sun, 4 Oct 2015 05:50:01 +0000 (01:50 -0400)
src/beam_stats_msg_graphite.erl

index 1cade91..bd5f3b4 100644 (file)
@@ -19,6 +19,7 @@
     , node_id_to_bin/1
     ]).
 
+-define(SCHEMA_VERSION, <<"beam_stats_v0">>).
 -define(T, #?MODULE).
 
 -type t() ::
@@ -97,18 +98,13 @@ node_id_to_bin(NodeID) ->
 -spec path_prefix_schema_version(t()) ->
     t().
 path_prefix_schema_version(?T{}=T) ->
-    path_prefix(T, schema_version()).
+    path_prefix(T, ?SCHEMA_VERSION).
 
 -spec path_prefix(t(), binary()) ->
     t().
 path_prefix(?T{path=Path}=T, <<Prefix/binary>>) ->
     T?T{path = [Prefix | Path]}.
 
--spec schema_version() ->
-    binary().
-schema_version() ->
-    <<"beam_stats_v0">>.
-
 -spec interleave([A], A) ->
     [A].
 interleave([], _) ->
This page took 0.026927 seconds and 4 git commands to generate.