Skip to content

Commit

Permalink
fix: exclude uuid for TinyGo
Browse files Browse the repository at this point in the history
Signed-off-by: knqyf263 <[email protected]>
  • Loading branch information
knqyf263 committed Mar 1, 2024
1 parent 1bede1e commit 2676919
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/uuid/uuid.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !tinygo.wasm

package uuid

import (
Expand Down Expand Up @@ -28,6 +30,6 @@ func SetFakeUUID(t *testing.T, format string) {
})
}

func New() uuid.UUID {
func New() UUID {
return newUUID()
}
13 changes: 13 additions & 0 deletions pkg/uuid/uuid_tinygo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//go:build tinygo.wasm

package uuid

// TinyGo doesn't work with github.com/google/uuid

type UUID string

func (UUID) String() string { return "" }

const Nil = ""

func New() UUID { return "" }

0 comments on commit 2676919

Please sign in to comment.