vendor/github.com/magiconair/properties/decode.go
changeset 265 05c40b36d3b2
parent 242 2a9ec03fe5a1
--- a/vendor/github.com/magiconair/properties/decode.go	Thu Sep 22 16:37:07 2022 +0200
+++ b/vendor/github.com/magiconair/properties/decode.go	Sat Feb 04 12:58:35 2023 +0100
@@ -1,4 +1,4 @@
-// Copyright 2018 Frank Schroeder. All rights reserved.
+// Copyright 2013-2022 Frank Schroeder. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
@@ -48,49 +48,49 @@
 //
 // Examples:
 //
-//     // Field is ignored.
-//     Field int `properties:"-"`
+//	// Field is ignored.
+//	Field int `properties:"-"`
 //
-//     // Field is assigned value of 'Field'.
-//     Field int
+//	// Field is assigned value of 'Field'.
+//	Field int
 //
-//     // Field is assigned value of 'myName'.
-//     Field int `properties:"myName"`
+//	// Field is assigned value of 'myName'.
+//	Field int `properties:"myName"`
 //
-//     // Field is assigned value of key 'myName' and has a default
-//     // value 15 if the key does not exist.
-//     Field int `properties:"myName,default=15"`
+//	// Field is assigned value of key 'myName' and has a default
+//	// value 15 if the key does not exist.
+//	Field int `properties:"myName,default=15"`
 //
-//     // Field is assigned value of key 'Field' and has a default
-//     // value 15 if the key does not exist.
-//     Field int `properties:",default=15"`
+//	// Field is assigned value of key 'Field' and has a default
+//	// value 15 if the key does not exist.
+//	Field int `properties:",default=15"`
 //
-//     // Field is assigned value of key 'date' and the date
-//     // is in format 2006-01-02
-//     Field time.Time `properties:"date,layout=2006-01-02"`
+//	// Field is assigned value of key 'date' and the date
+//	// is in format 2006-01-02
+//	Field time.Time `properties:"date,layout=2006-01-02"`
 //
-//     // Field is assigned the non-empty and whitespace trimmed
-//     // values of key 'Field' split by commas.
-//     Field []string
+//	// Field is assigned the non-empty and whitespace trimmed
+//	// values of key 'Field' split by commas.
+//	Field []string
 //
-//     // Field is assigned the non-empty and whitespace trimmed
-//     // values of key 'Field' split by commas and has a default
-//     // value ["a", "b", "c"] if the key does not exist.
-//     Field []string `properties:",default=a;b;c"`
+//	// Field is assigned the non-empty and whitespace trimmed
+//	// values of key 'Field' split by commas and has a default
+//	// value ["a", "b", "c"] if the key does not exist.
+//	Field []string `properties:",default=a;b;c"`
 //
-//     // Field is decoded recursively with "Field." as key prefix.
-//     Field SomeStruct
+//	// Field is decoded recursively with "Field." as key prefix.
+//	Field SomeStruct
 //
-//     // Field is decoded recursively with "myName." as key prefix.
-//     Field SomeStruct `properties:"myName"`
+//	// Field is decoded recursively with "myName." as key prefix.
+//	Field SomeStruct `properties:"myName"`
 //
-//     // Field is decoded recursively with "Field." as key prefix
-//     // and the next dotted element of the key as map key.
-//     Field map[string]string
+//	// Field is decoded recursively with "Field." as key prefix
+//	// and the next dotted element of the key as map key.
+//	Field map[string]string
 //
-//     // Field is decoded recursively with "myName." as key prefix
-//     // and the next dotted element of the key as map key.
-//     Field map[string]string `properties:"myName"`
+//	// Field is decoded recursively with "myName." as key prefix
+//	// and the next dotted element of the key as map key.
+//	Field map[string]string `properties:"myName"`
 func (p *Properties) Decode(x interface{}) error {
 	t, v := reflect.TypeOf(x), reflect.ValueOf(x)
 	if t.Kind() != reflect.Ptr || v.Elem().Type().Kind() != reflect.Struct {