Open rosroble opened 1 year ago
Hi, gopatch doesn't yet support elision in value declarations #6 . But it should work against the format specified in the patch. Ref The below patch should work & add the new line.
@@
@@
var (
SystemSubsystem = "system"
SystemLabelNames = []string{"hostname", "resource", "system_id"}
SystemMemoryLabelNames = []string{"hostname", "resource", "memory", "memory_id"}
+ SystemProcessorLabelNames = []string{"hostname", "resource", "processor", "processor_id"}
)
Thank you for reporting this! We plan to fix this in the future versions.
Hello!
I have a global var block as follows:
Let's say I want to insert a new variable
SystemProcessorLabelNames
after theSystemMemoryLabelNames
This doesn't work:
And this doesn't work:
Although replacing works fine like that:
But I need to append a new line. Appending works fine inside functions, just like that:
But inside var block it either fails or skips the file. Is this a bug or my mistake? Thanks.