Skip to content

Commit 3d7cd29

Browse files
author
seanchann
committed
fix config file bug
1 parent 2c30b9e commit 3d7cd29

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Configuration file is in json format like this:
2929
{
3030
"clients": [
3131
{
32+
"name": "client1",
3233
"host":"0.0.0.0",
3334
"port":18387,
3435
"encrypt":"aes-128-cfb",
@@ -37,6 +38,7 @@ Configuration file is in json format like this:
3738
"timeout":60
3839
},
3940
{
41+
"name": "client2",
4042
"host":"0.0.0.0",
4143
"port":18388,
4244
"encrypt":"aes-128-cfb",

build/build-image/files/config.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"clients": [
33
{
4+
"name": "client1",
45
"host":"0.0.0.0",
56
"port":18387,
67
"encrypt":"aes-128-cfb",
@@ -9,6 +10,7 @@
910
"timeout":60
1011
},
1112
{
13+
"name": "client2",
1214
"host":"0.0.0.0",
1315
"port":18388,
1416
"encrypt":"aes-128-cfb",

pkg/config/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type ConnectionInfo struct {
99
Password string `json:"password"`
1010
EnableOTA bool `json:"enableOTA"`
1111
Timeout int `json:"timeout"`
12-
Name string `json:"name,omitempty"`
12+
Name string `json:"name"`
1313

1414
//max connection for user
1515
MaxConnection int

0 commit comments

Comments
 (0)