custom metric 추가

This commit is contained in:
2023-11-16 19:47:30 +09:00
parent 8d764c8d18
commit ba72262d50
5 changed files with 137 additions and 60 deletions

View File

@ -242,7 +242,7 @@ func (hc *houstonClient) makeDownloadUrl(rel string) string {
return out
}
func copy(src, dst string) error {
func copyfile(src, dst string) error {
fi, err := os.Stat(src)
if err != nil {
return err
@ -311,7 +311,7 @@ func (hc *houstonClient) prepareUpdateSelf(req *shared.DeployRequest) (srcdir st
selfname, _ := os.Executable()
srcreplacer := path.Join(path.Dir(fname), "replacer") + path.Ext(selfname)
replacer = "./" + filepath.ToSlash("replacer"+path.Ext(selfname))
err = copy(srcreplacer, replacer)
err = copyfile(srcreplacer, replacer)
if err == nil {
err = os.Chmod(replacer, 0775)
}