Unexport struct methods

This commit is contained in:
2025-10-18 11:25:26 +02:00
parent a7740000d2
commit 8ac4b370c9
7 changed files with 228 additions and 236 deletions

View File

@@ -69,15 +69,15 @@ func newStatus(initial Status) *status {
}
}
// Get returns the current status
func (st *status) Get() Status {
// get returns the current status
func (st *status) get() Status {
st.mu.RLock()
defer st.mu.RUnlock()
return st.s
}
// Set updates the status and triggers the onStatusChange callback if set
func (st *status) Set(newStatus Status) {
// set updates the status and triggers the onStatusChange callback if set
func (st *status) set(newStatus Status) {
st.mu.Lock()
oldStatus := st.s
st.s = newStatus
@@ -90,8 +90,8 @@ func (st *status) Set(newStatus Status) {
}
}
// IsRunning returns true if the status is Running
func (st *status) IsRunning() bool {
// isRunning returns true if the status is Running
func (st *status) isRunning() bool {
st.mu.RLock()
defer st.mu.RUnlock()
return st.s == Running