···99 "net/url"
1010 "strings"
11111212- "github.com/gorilla/mux"
1212+ "github.com/go-chi/chi/v5"
13131414 "atcr.io/pkg/appview/db"
1515)
···338338 }
339339340340 // Get device ID from URL
341341- vars := mux.Vars(r)
342342- deviceID := vars["id"]
341341+ deviceID := chi.URLParam(r, "id")
343342 if deviceID == "" {
344343 http.Error(w, "device ID required", http.StatusBadRequest)
345344 return
+5-7
pkg/appview/handlers/images.go
···1010 "atcr.io/pkg/appview/middleware"
1111 "atcr.io/pkg/atproto"
1212 "atcr.io/pkg/auth/oauth"
1313- "github.com/gorilla/mux"
1313+ "github.com/go-chi/chi/v5"
1414)
15151616// DeleteTagHandler handles deleting a tag
···2626 return
2727 }
28282929- vars := mux.Vars(r)
3030- repo := vars["repository"]
3131- tag := vars["tag"]
2929+ repo := chi.URLParam(r, "repository")
3030+ tag := chi.URLParam(r, "tag")
32313332 // Get OAuth session for the authenticated user
3433 session, err := h.Refresher.GetSession(r.Context(), user.DID)
···7473 return
7574 }
76757777- vars := mux.Vars(r)
7878- repo := vars["repository"]
7979- digest := vars["digest"]
7676+ repo := chi.URLParam(r, "repository")
7777+ digest := chi.URLParam(r, "digest")
80788179 // Check if manifest is tagged
8280 tagged, err := db.IsManifestTagged(h.DB, user.DID, repo, digest)
+3-4
pkg/appview/handlers/repository.go
···1616 "atcr.io/pkg/atproto"
1717 "atcr.io/pkg/auth/oauth"
1818 "github.com/bluesky-social/indigo/atproto/identity"
1919- "github.com/gorilla/mux"
1919+ "github.com/go-chi/chi/v5"
2020)
21212222// RepositoryPageHandler handles the public repository page
···3131}
32323333func (h *RepositoryPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
3434- vars := mux.Vars(r)
3535- handle := vars["handle"]
3636- repository := vars["repository"]
3434+ handle := chi.URLParam(r, "handle")
3535+ repository := chi.URLParam(r, "repository")
37363837 // Look up user by handle
3938 owner, err := db.GetUserByHandle(h.DB, handle)
+2-3
pkg/appview/handlers/user.go
···66 "net/http"
7788 "atcr.io/pkg/appview/db"
99- "github.com/gorilla/mux"
99+ "github.com/go-chi/chi/v5"
1010)
11111212// UserPageHandler handles the public user page showing all images for a user
···1717}
18181919func (h *UserPageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
2020- vars := mux.Vars(r)
2121- handle := vars["handle"]
2020+ handle := chi.URLParam(r, "handle")
22212322 // Look up user by handle
2423 viewedUser, err := db.GetUserByHandle(h.DB, handle)
+1-1
pkg/atproto/lexicon.go
···433433 return "did:web:" + hostname
434434}
435435436436-// isDID checks if a string is a DID (starts with "did:")
436436+// IsDID checks if a string is a DID (starts with "did:")
437437func IsDID(s string) bool {
438438 return len(s) > 4 && s[:4] == "did:"
439439}