Модуль конфигурации был перенесен в директорию
This commit is contained in:
parent
3cb714f544
commit
309a47ea3a
1 changed files with 0 additions and 20 deletions
|
@ -1,20 +0,0 @@
|
||||||
module snapd.config;
|
|
||||||
|
|
||||||
import std.json;
|
|
||||||
import std.file;
|
|
||||||
import std.stdio : writeln;
|
|
||||||
|
|
||||||
class SnapdConfig {
|
|
||||||
private string _git;
|
|
||||||
private string _project;
|
|
||||||
|
|
||||||
this(string configFile) {
|
|
||||||
string jsonText = readText(configFile);
|
|
||||||
|
|
||||||
auto jsonData = parseJSON(jsonText);
|
|
||||||
if ("gits" !in jsonData)
|
|
||||||
writeln("Ключ отсутствует");
|
|
||||||
writeln(jsonData["git"].str);
|
|
||||||
writeln(jsonData["project"].str);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue