summaryrefslogtreecommitdiff
path: root/cf-r2
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-06 07:28:25 -0600
committerJeff Carr <[email protected]>2025-01-06 07:28:25 -0600
commitef537830309b310a59650500e158d5b4a9b3902d (patch)
tree49a601f937bd9313a1878f3624f742ece05deb2c /cf-r2
parent35bec795e7195e967d95399329fe7b6d0b7cc069 (diff)
stuff
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cf-r2')
-rw-r--r--cf-r2/Makefile30
-rw-r--r--cf-r2/download.go8
2 files changed, 34 insertions, 4 deletions
diff --git a/cf-r2/Makefile b/cf-r2/Makefile
new file mode 100644
index 0000000..2b57a99
--- /dev/null
+++ b/cf-r2/Makefile
@@ -0,0 +1,30 @@
+VERSION = $(shell git describe --tags)
+GUIVERSION = $(shell git describe --tags)
+BUILDTIME = $(shell date +%s)
+
+all: build
+
+build: goimports go.mod
+ go build -v upload.go
+ go build -v download.go
+ go build -v main.go
+
+raw:
+ GO111MODULE=off go build -v \
+ -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+
+vet:
+ GO111MODULE=off go vet
+
+goimports:
+ goimports -w *.go
+ # // to globally reset paths:
+ # // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go
+
+go.mod:
+ go mod init
+ go mod tidy
+
+clean:
+ rm -f go.*
+ rm -f upload download main
diff --git a/cf-r2/download.go b/cf-r2/download.go
index b2f4184..887ac99 100644
--- a/cf-r2/download.go
+++ b/cf-r2/download.go
@@ -10,10 +10,10 @@ import (
)
const (
- r2Endpoint = "<account-id>.r2.cloudflarestorage.com" // Replace with your R2 endpoint
- r2AccessKey = "<your-access-key>" // Replace with your Access Key
- r2SecretKey = "<your-secret-key>" // Replace with your Secret Key
- r2BucketName = "example-bucket" // Replace with your bucket name
+ r2Endpoint = "<account-id>.r2.cloudflarestorage.com" // Replace with your R2 endpoint
+ r2AccessKey = "<your-access-key>" // Replace with your Access Key
+ r2SecretKey = "<your-secret-key>" // Replace with your Secret Key
+ r2BucketName = "example-bucket" // Replace with your bucket name
)
func main() {