Explorar o código

refactor: rename Field to Struct for ref type create function

Hocon type reference is actually a child-struct's struct name
not necessarily the same name as the parent-sutrct's field name

This commit changes the variable name for more clarity
Zaiming (Stone) Shi %!s(int64=3) %!d(string=hai) anos
pai
achega
ecbf867551
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      apps/emqx/src/emqx_schema.erl

+ 2 - 2
apps/emqx/src/emqx_schema.erl

@@ -2094,9 +2094,9 @@ sc(Type, Meta) -> hoconsc:mk(Type, Meta).
 
 map(Name, Type) -> hoconsc:map(Name, Type).
 
-ref(Field) -> hoconsc:ref(?MODULE, Field).
+ref(StructName) -> hoconsc:ref(?MODULE, StructName).
 
-ref(Module, Field) -> hoconsc:ref(Module, Field).
+ref(Module, StructName) -> hoconsc:ref(Module, StructName).
 
 mk_duration(Desc, OverrideMeta) ->
     DefaultMeta = #{