Publish ITWorx Pulse source
Public source validation / validate (push) Failing after 3m8s

This commit is contained in:
ITWorx Pulse release export
2026-09-03 02:09:19 +02:00
commit bd774932d5
614 changed files with 77116 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package buildinfo
import "time"
// These values are replaced with -ldflags by reproducible release builds.
var (
Version = "development"
Commit = "unknown"
BuildTime = "unknown"
)
func BuiltAt() *time.Time {
value, err := time.Parse(time.RFC3339, BuildTime)
if err != nil {
return nil
}
value = value.UTC()
return &value
}
+25
View File
@@ -0,0 +1,25 @@
package buildinfo
import (
"testing"
"time"
)
func TestVersionIsNonEmpty(t *testing.T) {
if Version == "" {
t.Fatal("version must not be empty")
}
}
func TestBuiltAtRejectsPlaceholderAndNormalizesUTC(t *testing.T) {
original := BuildTime
t.Cleanup(func() { BuildTime = original })
BuildTime = "unknown"
if BuiltAt() != nil {
t.Fatal("placeholder build time must be absent")
}
BuildTime = "2026-08-12T04:00:00+02:00"
if got := BuiltAt(); got == nil || got.Format(time.RFC3339) != "2026-08-12T02:00:00Z" {
t.Fatalf("built at = %v", got)
}
}