-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconsts.go
49 lines (40 loc) · 864 Bytes
/
consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package inngestgo
import (
"runtime/debug"
)
const (
SDKAuthor = "inngest"
SDKLanguage = "go"
SyncKindInBand = "in_band"
SyncKindOutOfBand = "out_of_band"
)
const (
devServerOrigin = "http://127.0.0.1:8288"
defaultAPIOrigin = "https://api.inngest.com"
defaultEventAPIOrigin = "https://inn.gs"
)
var (
SDKVersion = ""
)
func init() {
readBuildInfo()
}
func readBuildInfo() {
info, ok := debug.ReadBuildInfo()
if !ok {
return
}
/*
Find and set the SDK version.
When imported into another project, its value will be something like
"v0.7.5-0.20250305172920-ddde6dd6f565".
When run within this project, it'll be "(devel)".
*/
const modulePath = "github.com/inngest/inngestgo"
for _, dep := range info.Deps {
if dep.Path == modulePath && dep.Version != "" {
SDKVersion = dep.Version
break
}
}
}