Skip to content

Instantly share code, notes, and snippets.

View IshanDaga's full-sized avatar

Ishan Daga IshanDaga

View GitHub Profile
@IshanDaga
IshanDaga / proto-to-map.go
Created March 2, 2024 10:51
Create a go map from any proto message without proto->json->map
package main
import (
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protodesc"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/descriptorpb"
"google.golang.org/protobuf/types/dynamicpb"
)
@stephde
stephde / redis-task-queue.go
Last active April 11, 2024 16:12
Delayed task queue with redis in golang
package main
import (
"encoding/json"
"fmt"
"time"
"github.com/go-redis/redis"
"github.com/google/uuid"
)
@unstppbl
unstppbl / go_time_parsing.md
Last active September 23, 2024 07:10
Parsing custom time layout in Golang

There are some key values that the time.Parse is looking for.

By changing:

test, err := time.Parse("10/15/1983", "10/15/1983")

to