aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/misc/deploy.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-06 09:58:02 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-06 09:58:02 +0800
commit6f5e22e764283262ae8c6519bb030766db0fd35b (patch)
treec56038bd7b5dc31d5bae5dd6e323688725c5262e /forged/internal/misc/deploy.go
parentFix load ordering issue that causes the forge title to disappear (diff)
downloadforge-6f5e22e764283262ae8c6519bb030766db0fd35b.tar.gz
forge-6f5e22e764283262ae8c6519bb030766db0fd35b.tar.zst
forge-6f5e22e764283262ae8c6519bb030766db0fd35b.zip
Add more documentation comments
Diffstat (limited to 'forged/internal/misc/deploy.go')
-rw-r--r--forged/internal/misc/deploy.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/forged/internal/misc/deploy.go b/forged/internal/misc/deploy.go
index 0f24f49..3ee5f92 100644
--- a/forged/internal/misc/deploy.go
+++ b/forged/internal/misc/deploy.go
@@ -9,6 +9,8 @@ import (
"os"
)
+// DeployBinary copies the contents of a binary file to the target destination path.
+// The destination file is created with executable permissions.
func DeployBinary(src fs.File, dst string) (err error) {
var dstFile *os.File
if dstFile, err = os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0o755); err != nil {