Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 482 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 482 Bytes

Traceable Context

Traceable Context is a wrapper around go context which will provide a way to share a traceable UUID between different contexts

  • New context
package main

import (
    "github.com/google/uuid"
    "github.com/tryfix/traceable-context"
)

func main() {
 ctx := traceable_context.WithUUID(uuid.New())
}
    
  • Context from a parent context
    parent := contect.Background()
    ctx := traceable_context.WithUUID(parent, uuid.New())