Skip to content

Commit

Permalink
remove id.go
Browse files Browse the repository at this point in the history
  • Loading branch information
miku committed Jan 4, 2022
1 parent 8435bf3 commit bee840c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
9 changes: 9 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
package span

import (
"encoding/base64"
"fmt"
)

Expand All @@ -45,3 +46,11 @@ type Skip struct {
func (s Skip) Error() string {
return fmt.Sprintf("[skip] %s", s.Reason)
}

// GenFincID returns a finc.id string consisting of an arbitraty prefix (e.g.
// "ai"), source id and URL safe record id. No additional checks, sid and rid
// should not be empty.
func GenFincID(sid, rid string) string {
return fmt.Sprintf("ai-%s-%s", sid,
base64.RawURLEncoding.EncodeToString([]byte(rid)))
}
File renamed without changes.
14 changes: 0 additions & 14 deletions id.go

This file was deleted.

0 comments on commit bee840c

Please sign in to comment.