Skip to content

Instantly share code, notes, and snippets.

@Abdulsametileri
Created July 12, 2022 12:43
Show Gist options
  • Save Abdulsametileri/eeb79217ab2efe54c7ee9ab5a4d92558 to your computer and use it in GitHub Desktop.
Save Abdulsametileri/eeb79217ab2efe54c7ee9ab5a4d92558 to your computer and use it in GitHub Desktop.
func (p *packageUsecase) TrackByVehicleID(ctx context.Context, id string) (*domain.Package, error) {
bytes, err := p.pc.ConsumeByVehicleID(ctx, id)
if err != nil {
return nil, err
}
var res domain.Package
err = json.Unmarshal(bytes, &res)
return &res, err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment