Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsUserProgramCode ¶
IsUserProgramCode checks to see if this is the special asset containing the users's code
func MassageIfUserProgramCodeAsset ¶
MassageIfUserProgramCodeAsset takes the text for a function and cleans it up a bit to make the user visible diffs less noisy. Specifically:
- it tries to condense things by changling multiple blank lines into a single blank line.
- it normalizs the sha hashes we emit so that changes to them don't appear in the diff.
- it elides the with-capture headers, as changes there are not generally meaningful.
TODO(https://github.com/khulnasoft/codeinfra/issues/592) this is baking in a lot of knowledge about codeinfra serialized functions. We should try to move to an alternative mode that isn't so brittle. Options include:
- Have a documented delimeter format that plan.go will look for. Have the function serializer emit those delimeters around code that should be ignored.
- Have our resource generation code supply not just the resource, but the "user presentable" resource that cuts out a lot of cruft. We could then just diff that content here.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.