-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: Add constants UidEmpty and GidEmpty and FileCopyNoPerms function Instead of using '-1' to indicate "do not change userid" (or groupid) to FileCopy, provide constants UidEmpty and GidEmpty. Also add simplified FileCopyNoPerms to call FileCopy without mode or uid/gid. * fix: Improvements to yaml.Unmarshal for types.Imports and add some go tests There is one change here, and that is to break if a stacker yaml has an import that is a dictionary type. The content in an 'import' is now only supported as a string or a list, not a dictionary. For example, these are allowed: * import: /path/to/file * import: - /file - /file2 - path: /file3 But this is not: * import: path: /file3 Improvements here: * Drop duplicate code blocks from getImportFromInterface There were 2 identical codeblocks, one with a type convert to map[string]interface{} and one with type convert to map[interface{}]interface{}. That was present to handle the dict case. * Add some golang tests to for unmarshalling. * Type check the values of all string Import fields, rather than just converting them to a string with 'fmt.Sprintf("%v")' --------- Signed-off-by: Scott Moser <smoser@brickies.net>
- Loading branch information
Showing
6 changed files
with
251 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.