Skip to content

Commit 3919ffd

Browse files
committed
refactor: use hypeman-go SDK for cp operations
Refactor cp command to use the SDK's lib.CpToInstance and lib.CpFromInstance instead of duplicating WebSocket handling logic. Changes: - Replace copyFileToInstance with SDK call - Replace copyDirToInstance with SDK call - Replace copyFromInstance with SDK call - Remove unused createDirOnInstance function - Remove unused syscall import - Add replace directive for local hypeman-go (for development) This reduces code duplication and ensures bug fixes and features in the SDK are automatically available in the CLI.
1 parent 1d565ea commit 3919ffd

File tree

3 files changed

+95
-318
lines changed

3 files changed

+95
-318
lines changed

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,5 @@ require (
7474
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
7575
google.golang.org/grpc v1.75.1 // indirect
7676
)
77+
78+
replace github.com/onkernel/hypeman-go => /home/raf/code/hypeman-go

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
105105
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
106106
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
107107
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
108-
github.com/onkernel/hypeman-go v0.7.0 h1:KUeY4VGJtStA4+zkPtx7eDCO3rSznbIVoj4U6l+g50Q=
109-
github.com/onkernel/hypeman-go v0.7.0/go.mod h1:BPT1yh0gbby1E+As/xLM3GVjw7752+2C5SaEiJV9rRc=
110108
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
111109
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
112110
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=

0 commit comments

Comments
 (0)