You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2017/01/31 04:48:28 UTC

[1/3] incubator-mynewt-newt git commit: MYNEWT-575 Use camelCase for new variables Changed value_val and value_exist to valueVal and valueExist.

Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/develop 4fc6247a1 -> 6620780a8


MYNEWT-575 Use camelCase for new variables
Changed value_val and value_exist to valueVal and valueExist.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/b97b6de1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/b97b6de1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/b97b6de1

Branch: refs/heads/develop
Commit: b97b6de12a08e3b5bcb61a9bf3cc2aae35e15b9c
Parents: 38ce689
Author: cwanda <wa...@happycity.com>
Authored: Mon Jan 30 16:12:10 2017 -0800
Committer: cwanda <wa...@happycity.com>
Committed: Mon Jan 30 16:18:59 2017 -0800

----------------------------------------------------------------------
 newt/syscfg/syscfg.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/b97b6de1/newt/syscfg/syscfg.go
----------------------------------------------------------------------
diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
index 84bf7f5..f5cef0e 100644
--- a/newt/syscfg/syscfg.go
+++ b/newt/syscfg/syscfg.go
@@ -287,9 +287,9 @@ func readSetting(name string, lpkg *pkg.LocalPackage,
 	entry.Description = stringValue(vals["description"])
 
 	// The value field for setting definition is required.
-	value_val, value_exist := vals["value"]
-	if value_exist {
-		entry.Value = stringValue(value_val)
+	valueVal, valueExist := vals["value"]
+	if valueExist {
+		entry.Value = stringValue(valueVal)
 	} else {
 		return entry, util.FmtNewtError(
 			"setting %s does not have required value field", name)


[3/3] incubator-mynewt-newt git commit: This closes #34.

Posted by cc...@apache.org.
This closes #34.

Merge remote-tracking branch 'cwanda/MYNEWT-575' into develop

* cwanda/MYNEWT-575:
  MYNEWT-575 Use camelCase for new variables Changed value_val and value_exist to valueVal and valueExist.
  MYNEWT-575 Checks for required "value" field. #comment Updated newt to print an error message and abort ahen a setting definition does not specify the required "value" field. #close


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/6620780a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/6620780a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/6620780a

Branch: refs/heads/develop
Commit: 6620780a82504abe619c2e733d51bc1a45b17e3e
Parents: 4fc6247 b97b6de
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Jan 30 20:48:37 2017 -0800
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Jan 30 20:48:37 2017 -0800

----------------------------------------------------------------------
 newt/syscfg/syscfg.go | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------



[2/3] incubator-mynewt-newt git commit: MYNEWT-575 Checks for required "value" field. #comment Updated newt to print an error message and abort ahen a setting definition does not specify the required "value" field. #close

Posted by cc...@apache.org.
MYNEWT-575 Checks for required "value" field. #comment Updated newt to print an error message and abort ahen a setting definition does not specify the required "value" field. #close

Updates newt to check that a setting definition has the required "value" field:

1) Checks the "value" key is specified for a setting definition map.
2) Prints an error message and aborts when one is not specified.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/38ce6892
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/38ce6892
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/38ce6892

Branch: refs/heads/develop
Commit: 38ce689283222fdba4b739cb92a45bcee6500e6b
Parents: 4fc6247
Author: cwanda <wa...@happycity.com>
Authored: Sat Jan 28 12:21:39 2017 -0800
Committer: cwanda <wa...@happycity.com>
Committed: Mon Jan 30 16:18:59 2017 -0800

----------------------------------------------------------------------
 newt/syscfg/syscfg.go | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/38ce6892/newt/syscfg/syscfg.go
----------------------------------------------------------------------
diff --git a/newt/syscfg/syscfg.go b/newt/syscfg/syscfg.go
index 1778b24..84bf7f5 100644
--- a/newt/syscfg/syscfg.go
+++ b/newt/syscfg/syscfg.go
@@ -283,9 +283,18 @@ func readSetting(name string, lpkg *pkg.LocalPackage,
 	entry := CfgEntry{}
 
 	entry.Name = name
-	entry.Description = stringValue(vals["description"])
-	entry.Value = stringValue(vals["value"])
 	entry.PackageDef = lpkg
+	entry.Description = stringValue(vals["description"])
+
+	// The value field for setting definition is required.
+	value_val, value_exist := vals["value"]
+	if value_exist {
+		entry.Value = stringValue(value_val)
+	} else {
+		return entry, util.FmtNewtError(
+			"setting %s does not have required value field", name)
+	}
+
 	if vals["type"] == nil {
 		entry.SettingType = CFG_SETTING_TYPE_RAW
 	} else {