Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working on Pirsch

Marvin Blum Kugelschieber

💭
Working on Pirsch
View GitHub Profile
@Kugelschieber
Kugelschieber / golang_timer_example.go
Created Jan 25, 2021
Example for running a timed function call in Golang without leaking the goroutine
View golang_timer_example.go
package main
import (
"context"
"fmt"
"log"
"time"
)
func runTimed(tick time.Duration, f func()) context.CancelFunc {
@Kugelschieber
Kugelschieber / copy_gcs_bucket_to_minio.go
Last active Dec 22, 2019
This little Go application will copy everything from one Google Cloud Storage Bucket to a MinIO Bucket. You'll need a GCS credentials file and a MinIO access key + secret.
View copy_gcs_bucket_to_minio.go
package main
import (
"cloud.google.com/go/storage"
"context"
"github.com/minio/minio-go"
"google.golang.org/api/iterator"
"log"
"os"
)