Skip to content

fix: Fix Build for GOOS=linux GOARCH=arm GOARM=6 #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions pkg/util/timeofday/time_of_day.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ const (
// Max is the maximum TimeOfDay value (1 second before midnight)
Max = Time2400

microsecondsPerSecond = 1e6
microsecondsPerMinute = 60 * microsecondsPerSecond
microsecondsPerHour = 60 * microsecondsPerMinute
microsecondsPerDay = 24 * microsecondsPerHour
nanosPerMicro = 1000
secondsPerDay = 24 * 60 * 60
microsecondsPerSecond int64 = 1e6
microsecondsPerMinute = 60 * microsecondsPerSecond
microsecondsPerHour = 60 * microsecondsPerMinute
microsecondsPerDay = 24 * microsecondsPerHour
nanosPerMicro = 1000
secondsPerDay = 24 * 60 * 60
)

// New creates a TimeOfDay representing the specified time.
Expand Down Expand Up @@ -147,19 +147,19 @@ func (t TimeOfDay) Hour() int {
if t == Time2400 {
return 24
}
return int(int64(t)%microsecondsPerDay) / microsecondsPerHour
return int(int64(t) % microsecondsPerDay / microsecondsPerHour)
}

// Minute returns the minute offset within the hour specified by t, in the
// range [0, 59].
func (t TimeOfDay) Minute() int {
return int(int64(t)%microsecondsPerHour) / microsecondsPerMinute
return int(int64(t) % microsecondsPerHour / microsecondsPerMinute)
}

// Second returns the second offset within the minute specified by t, in the
// range [0, 59].
func (t TimeOfDay) Second() int {
return int(int64(t)%microsecondsPerMinute) / microsecondsPerSecond
return int(int64(t) % microsecondsPerMinute / microsecondsPerSecond)
}

// Microsecond returns the microsecond offset within the second specified by t,
Expand Down
6 changes: 3 additions & 3 deletions pkg/util/tsearch/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ func (e *tsEvaluator) evalFollowedBy(
if lExhausted && rExhausted {
break
}
var lPos, rPos int
var lPos, rPos int64
if !lExhausted {
lPos = int(lPositions.positions[lIdx].position) + lOffset
lPos = int64(lPositions.positions[lIdx].position) + int64(lOffset)
} else {
// Quit unless we're outputting all of the RHS, which we will if we have
// a negative match on the LHS.
Expand All @@ -185,7 +185,7 @@ func (e *tsEvaluator) evalFollowedBy(
lPos = math.MaxInt64
}
if !rExhausted {
rPos = int(rPositions.positions[rIdx].position) + rOffset
rPos = int64(rPositions.positions[rIdx].position) + int64(rOffset)
} else {
// Quit unless we're outputting all of the LHS, which we will if we have
// a negative match on the RHS.
Expand Down