webdevops / go-replace Goto Github PK
View Code? Open in Web Editor NEWReplace in file console utility written in golang (for eg. usage in docker images)
License: MIT License
Replace in file console utility written in golang (for eg. usage in docker images)
License: MIT License
Trying to replace envs in all YAML files in directory go-replace --mode=template --path=./k8s/ --path-pattern='*.yaml'
. But can't find any reasonable way to exclude nested directories. How can I process only first level of selected path?
Hi folks,
when re-starting one of our containers, go-replace exits with a SEGV:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068]
goroutine 1 [running]:
main.searchFilesInPath.func1(0x7ffe6f609c49, 0x16, 0x0, 0x0, 0x73cb20, 0xc420017560, 0x20, 0x618f40)
/Users/mblaschke/Projects/go-replace/filehandling.go:56 +0x38
path/filepath.Walk(0x7ffe6f609c49, 0x16, 0xc42000b240, 0x10, 0x610960)
/usr/local/Cellar/go/1.8.1/libexec/src/path/filepath/path.go:396 +0x8f
main.searchFilesInPath(0x7ffe6f609c49, 0x16, 0xc420013b80)
/Users/mblaschke/Projects/go-replace/filehandling.go:84 +0xb0
main.buildFileitems(0xc4200db340, 0x0, 0x7, 0x7, 0x0, 0x0)
/Users/mblaschke/Projects/go-replace/main.go:463 +0x45e
main.main()
/Users/mblaschke/Projects/go-replace/main.go:482 +0x10a
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x5d2068]
goroutine 1 [running]:
main.searchFilesInPath.func1(0x7ffd3d8e7c49, 0x16, 0x0, 0x0, 0x73cb20, 0xc4200174d0, 0x20, 0x618f40)
/Users/mblaschke/Projects/go-replace/filehandling.go:56 +0x38
path/filepath.Walk(0x7ffd3d8e7c49, 0x16, 0xc42000af80, 0x10, 0x610960)
/usr/local/Cellar/go/1.8.1/libexec/src/path/filepath/path.go:396 +0x8f
main.searchFilesInPath(0x7ffd3d8e7c49, 0x16, 0xc420013930)
/Users/mblaschke/Projects/go-replace/filehandling.go:84 +0xb0
main.buildFileitems(0xc4200df420, 0x0, 0x7, 0x7, 0x0, 0x0)
/Users/mblaschke/Projects/go-replace/main.go:463 +0x45e
main.main()
/Users/mblaschke/Projects/go-replace/main.go:482 +0x10a
At the moment, I don't have the exact command being run - nevertheless, let me know if you need more information to resolve this.
Thank you very much for your time!
Best,
Anton
Hard to have a good feeling about adoption if a build has been failing for the last 20 days. Is this being investigated?
package is build with stdlib 1.19.1 which has critical Vulnerabilities.
Fixed in Go >=1.19.9 and >=1.20.4.
anyway we can get an update?
Hello,
When scanning a Docker image from webdevops with any inspector (eg: AWS Inspector). It only has one CVE remaining in the image.
CVE-2022-29526 on file path: usr/local/bin/go-replace.
The recommanded remediation is :
Upgrade your installed software packages to the proposed fixed in version and release.
Is it possible to upgrade this package to 0.1.0 ? Actually it is v0.0.0-20220928140112-f11e5e49a4ec
Regards.
Fix buffer overwriting and optimize handling
Is there support for named capture group replacement?
Implement --path=./conf/
and --path-pattern=*.conf
for simple matching and --path-regex=\.conf$
for regex file matching
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.