Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PatchKeepWhitespace ¶ added in v0.6.0
patchKeepWhitespace applies changes while ignoring whitespace changes. Used as the YAML libraries trims away the whitespace, so this function translates the changes from patches while ignoring whitespace trimming.
Based on: [https://github.com/mikefarah/yq/issues/515#issuecomment-1574420861]
Effectively doing:
cat "$modified_file" | diff -Bw "$original" - | patch "$original" -
Note that this approach is not 100% and does not work when the edits are surrounded by whitespace. Instead, this only preserves the whitespace unaffected by the edits.
func ToCamelCase ¶
ToCamelCase is a very stupid implementation for converting PascalCase to camelCase.
NOTE: If we need to convert user-provided strings to camelCase, then we should replace this with the community strcase package.
Types ¶
This section is empty.