Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

YAML configuration processor

License

NotificationsYou must be signed in to change notification settings

processone/yconf

Repository files navigation

CICoverage StatusHex version

You can find usage example in ejabberd. Seeeconf.erl andejabberd_options.erl for most parts that are using it.

Validation is performed based on rules that you pass toyconf:parser/2, there is no way to load those rules fromsome special syntax file. Generally you will do something like this:

yconf:parse("/home/me/conf.yml", #{  host => yconf:string(),  opts => yconf:options(#{    addr => yconf:ip(),    count => yconf:non_neg_int()  })}).

That when feed with:

host: "test.com"opts:  addr: "127.0.0.1"  count: 100

should produce:

{ok,[{host,"test.com"},{opts,[{addr,{127,0,0,1}},{count,100}]}]}

[8]ページ先頭

©2009-2025 Movatter.jp