mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-27 11:17:29 +02:00
refactor(state): replace Entrypoint method with ShortLinkMatcher interface
- Cleaned up agent go.mod by removing unused indirect dependencies.
This commit is contained in:
@@ -126,12 +126,12 @@ func (s *FileServer) Start(parent task.Parent) gperr.Error {
|
||||
|
||||
routes.HTTP.Add(s)
|
||||
if state := config.WorkingState.Load(); state != nil {
|
||||
state.Entrypoint().ShortLinkMatcher().AddRoute(s.Alias)
|
||||
state.ShortLinkMatcher().AddRoute(s.Alias)
|
||||
}
|
||||
s.task.OnFinished("remove_route_from_http", func() {
|
||||
routes.HTTP.Del(s)
|
||||
if state := config.WorkingState.Load(); state != nil {
|
||||
state.Entrypoint().ShortLinkMatcher().DelRoute(s.Alias)
|
||||
state.ShortLinkMatcher().DelRoute(s.Alias)
|
||||
}
|
||||
})
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user