Skip to content

Commit

Permalink
cleanup of unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengarrett committed Jul 3, 2024
1 parent aecb27e commit a975a86
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 111 deletions.
90 changes: 12 additions & 78 deletions docs/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
- [ ] Find all uuid zip files that use legacy zip encodings, EXPLODE, UNSHRINK, UNREDUCE.
- [ ] Find all msdos apps that use incompatible archives such as LHA, ARJ, ARC.

### Bug fixes

- [ ] htmx search for id or uuid, incomplete (less than 32 chars) uuid should not trigger a search.
- [ ] Reader is not displaying the textfile. `/f/b62716c`


### Templates



---

#### Upload tests

24 June.
Expand All @@ -29,81 +41,3 @@
- [X] Image brand, logo or proof.
- [X] Text, DOS and Windows magazines.
- [X] Advanced.

### Bug fixes

- [ ] htmx search for id or uuid, incomplete (less than 32 chars) uuid should not trigger a search.

---

### Errors when displaying artifacts

```
10:56:03 ERROR app/error.go:165 500 error for "artifact": write tcp 127.0.0.1:1323->127.0.0.1:52014: write: broken pipe
github.com/Defacto2/server/handler/app.InternalErr
/home/ben/github/server/handler/app/error.go:165
github.com/Defacto2/server/handler/app.Dirs.Artifact
/home/ben/github/server/handler/app/dirs.go:155
github.com/Defacto2/server/handler.Configuration.website.func3
/home/ben/github/server/handler/router.go:208
github.com/labstack/echo/v4.(*Echo).add.func1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:587
github.com/Defacto2/server/handler.Configuration.nonce.Middleware.MiddlewareWithConfig.func1.1
/home/ben/go/pkg/mod/github.com/labstack/[email protected]/session/session.go:73
github.com/Defacto2/server/handler.Configuration.Controller.RemoveTrailingSlashWithConfig.func2.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/slash.go:117
github.com/labstack/echo/v4/middleware.RequestLoggerConfig.ToMiddleware.func1.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/request_logger.go:286
github.com/Defacto2/server/handler.Configuration.Controller.Secure.SecureWithConfig.func4.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/secure.go:141
github.com/labstack/echo/v4.(*Echo).ServeHTTP.func1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:668
github.com/Defacto2/server/handler.Configuration.Controller.NonWWWRedirect.NonWWWRedirectWithConfig.redirect.func6.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/redirect.go:152
github.com/labstack/echo/v4/middleware.RewriteWithConfig.func1.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/rewrite.go:77
github.com/labstack/echo/v4.(*Echo).ServeHTTP
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:674
net/http.serverHandler.ServeHTTP
/usr/local/go/src/net/http/server.go:3137
net/http.(*conn).serve
/usr/local/go/src/net/http/server.go:2039
10:56:03 ERROR app/error.go:182 the server could not render the html template for this page: write tcp 127.0.0.1:1323->127.0.0.1:52014: write: broken pipe
github.com/Defacto2/server/handler/app.InternalErr
/home/ben/github/server/handler/app/error.go:182
github.com/Defacto2/server/handler/app.Dirs.Artifact
/home/ben/github/server/handler/app/dirs.go:155
github.com/Defacto2/server/handler.Configuration.website.func3
/home/ben/github/server/handler/router.go:208
github.com/labstack/echo/v4.(*Echo).add.func1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:587
github.com/Defacto2/server/handler.Configuration.nonce.Middleware.MiddlewareWithConfig.func1.1
/home/ben/go/pkg/mod/github.com/labstack/[email protected]/session/session.go:73
github.com/Defacto2/server/handler.Configuration.Controller.RemoveTrailingSlashWithConfig.func2.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/slash.go:117
github.com/labstack/echo/v4/middleware.RequestLoggerConfig.ToMiddleware.func1.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/request_logger.go:286
github.com/Defacto2/server/handler.Configuration.Controller.Secure.SecureWithConfig.func4.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/secure.go:141
github.com/labstack/echo/v4.(*Echo).ServeHTTP.func1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:668
github.com/Defacto2/server/handler.Configuration.Controller.NonWWWRedirect.NonWWWRedirectWithConfig.redirect.func6.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/redirect.go:152
github.com/labstack/echo/v4/middleware.RewriteWithConfig.func1.1
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/middleware/rewrite.go:77
github.com/labstack/echo/v4.(*Echo).ServeHTTP
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:674
net/http.serverHandler.ServeHTTP
/usr/local/go/src/net/http/server.go:3137
net/http.(*conn).serve
/usr/local/go/src/net/http/server.go:2039
10:56:03 DPANIC config/error.go:54 Custom response handler broke: %swrite tcp 127.0.0.1:1323->127.0.0.1:52014: write: broken pipe
github.com/Defacto2/server/internal/config.Config.CustomErrorHandler
/home/ben/github/server/internal/config/error.go:54
github.com/labstack/echo/v4.(*Echo).ServeHTTP
/home/ben/go/pkg/mod/github.com/labstack/echo/[email protected]/echo.go:675
net/http.serverHandler.ServeHTTP
/usr/local/go/src/net/http/server.go:3137
net/http.(*conn).serve
/usr/local/go/src/net/http/server.go:2039
```
18 changes: 0 additions & 18 deletions handler/app/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -920,24 +920,6 @@ func ProdZoo(c echo.Context, id string) error {
return nil
}

// Interview is the handler for the People Interviews page.
func Reader(c echo.Context) error {
const title, name = "Textfile reader", "reader"
data := empty(c)
data["title"] = title
data["description"] = "Discussions with scene members."
data["logo"] = title
data["h1"] = title
data["lead"] = "An incomplete list of discussions and unedited interviews with sceners," +
" crackers and demo makers."
data["interviews"] = Interviewees()
err := c.Render(http.StatusOK, name, data)
if err != nil {
return InternalErr(c, name, err)
}
return nil
}

// ReadmeDel handles the post submission for the Delete readme asset button.
func ReadmeDel(c echo.Context, extraDir string) error {
var f Form
Expand Down
1 change: 0 additions & 1 deletion handler/app/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@ func templates() map[string]filename {
"interview": "interview.tmpl",
"magazine": "releaseryear.tmpl",
"magazine-az": releaser,
"reader": "reader_todo.tmpl",
"releaser": releaser,
"releaser-year": "releaseryear.tmpl",
"scener": scener,
Expand Down
1 change: 0 additions & 1 deletion handler/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ func (c Configuration) website(e *echo.Echo, logger *zap.SugaredLogger, dir app.
s.GET("/zoo/prod/:id", func(cx echo.Context) error {
return app.ProdZoo(cx, cx.Param("id"))
})
s.GET("/r/:id", app.Reader)
s.GET("/releaser", app.Releaser)
s.GET("/releaser/a-z", app.ReleaserAZ)
s.GET("/releaser/year", app.ReleaserYear)
Expand Down
13 changes: 0 additions & 13 deletions internal/rezip/rezip.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,3 @@ func Test(name string) error {
}
return nil
}

// Recompress placeholder, TODO.
func Recompress(name, dest string) error {
// run tests on paths

// magicnumber test the named file

// switch then load a func for each match

fmt.Fprintln(os.Stdout, "recompress", name, dest)

return nil
}

0 comments on commit a975a86

Please sign in to comment.