Skip to content

Commit 5aaec86

Browse files
OliverOliver
authored andcommitted
lint(proxy): add final dot in comment sentences
1 parent 077ddbf commit 5aaec86

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

proxy/process.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (p *Process) getLastRequestHandled() time.Time {
134134
return p.lastRequestHandled
135135
}
136136

137-
// custom error types for swapping state
137+
// custom error types for swapping state.
138138
var (
139139
ErrExpectedStateMismatch = errors.New("expected state mismatch")
140140
ErrInvalidStateTransition = errors.New("invalid state transition")
@@ -169,7 +169,7 @@ func (p *Process) swapState(expectedState, newState ProcessState) (ProcessState,
169169
return p.state, nil
170170
}
171171

172-
// Helper function to encapsulate transition rules
172+
// Helper function to encapsulate transition rules.
173173
func isValidTransition(from, to ProcessState) bool {
174174
switch from {
175175
case StateStopped:
@@ -260,7 +260,6 @@ func (p *Process) start() error {
260260
p.proxyLogger.Infof("<%s> CMD: %v", p.ID, args)
261261
p.proxyLogger.Infof("<%s> ----------------------------------------", p.ID)
262262
err = p.cmd.Start()
263-
264263
// Set process state to failed
265264
if err != nil {
266265
if curState, swapErr := p.swapState(StateStarting, StateStopped); swapErr != nil {
@@ -563,7 +562,7 @@ func (p *Process) ProxyRequest(w http.ResponseWriter, r *http.Request) {
563562
p.ID, r.RequestURI, startDuration, totalTime)
564563
}
565564

566-
// waitForCmd waits for the command to exit and handles exit conditions depending on current state
565+
// waitForCmd waits for the command to exit and handles exit conditions depending on current state.
567566
func (p *Process) waitForCmd() {
568567
exitErr := p.cmd.Wait()
569568
p.proxyLogger.Debugf("<%s> cmd.Wait() returned error: %v", p.ID, exitErr)
@@ -607,7 +606,7 @@ func (p *Process) waitForCmd() {
607606
p.cmdMutex.Unlock()
608607
}
609608

610-
// cmdStopUpstreamProcess attempts to stop the upstream process gracefully
609+
// cmdStopUpstreamProcess attempts to stop the upstream process gracefully.
611610
func (p *Process) cmdStopUpstreamProcess() error {
612611
p.processLogger.Debugf("<%s> cmdStopUpstreamProcess() initiating graceful stop of upstream process", p.ID)
613612

@@ -740,7 +739,7 @@ func newStatusResponseWriter(p *Process, w http.ResponseWriter) *statusResponseW
740739
return s
741740
}
742741

743-
// statusUpdates sends status updates to the client while the model is loading
742+
// statusUpdates sends status updates to the client while the model is loading.
744743
func (s *statusResponseWriter) statusUpdates(ctx context.Context) {
745744
s.wg.Add(1)
746745
defer s.wg.Done()
@@ -798,7 +797,7 @@ func (s *statusResponseWriter) statusUpdates(ctx context.Context) {
798797
}
799798
}
800799

801-
// waitForCompletion waits for the statusUpdates goroutine to finish
800+
// waitForCompletion waits for the statusUpdates goroutine to finish.
802801
func (s *statusResponseWriter) waitForCompletion(timeout time.Duration) bool {
803802
done := make(chan struct{})
804803
go func() {

proxy/proxymanager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import (
2020
"sync"
2121
"time"
2222

23+
"github.com/gin-gonic/gin"
2324
"github.com/lynxai-team/goinfer/conf"
2425
"github.com/lynxai-team/goinfer/event"
2526
"github.com/lynxai-team/goinfer/proxy/config"
26-
"github.com/gin-gonic/gin"
2727
"github.com/tidwall/gjson"
2828
"github.com/tidwall/sjson"
2929
)

0 commit comments

Comments
 (0)