mirror of
https://github.com/taigrr/pastebin
synced 2026-04-17 04:14:58 -07:00
feat: modernize codebase and complete API surface
- Update module path from prologic/pastebin to taigrr/pastebin - Replace go.rice with stdlib embed for templates and static assets - Replace httprouter with stdlib net/http ServeMux (Go 1.22+) - Replace namsral/flag with cobra + fang for CLI argument parsing - Fix inverted TLS insecure logic in client (was negating the flag) - Close HTTP response body in client - Use base64 URLEncoding instead of StdEncoding for paste IDs - Add comprehensive handler tests for all endpoints - Add client package tests - Add utils tests for RandomString - Remove templates.go (replaced by embed) - Remove unused dependencies (go-metrics, stats, logger, httprouter, go.rice)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</section>
|
||||
<section class="navbar-section"></section>
|
||||
</header>
|
||||
{{template "content" .}}
|
||||
{{if .}}{{template "view_content" .}}{{else}}{{template "index_content"}}{{end}}
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "content"}}
|
||||
{{define "index_content"}}
|
||||
<section class="container">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{define "content"}}
|
||||
{{define "view_content"}}
|
||||
<pre class="code">
|
||||
<code>{{.Blob}}</code>
|
||||
</pre>
|
||||
@@ -16,7 +16,7 @@
|
||||
</a>
|
||||
<ul class="menu">
|
||||
<li class="menu-item">
|
||||
<form action="/delete/{{.UUID}}" method="POST">
|
||||
<form action="/delete/{{.UUID}}" method="POST">
|
||||
<button type="submit">
|
||||
<span href="#dropdowns">
|
||||
<i class="icon icon-delete"></i>
|
||||
|
||||
Reference in New Issue
Block a user