feat: update go to 1.21.3
This commit is contained in:
parent
4dbbfcd6f2
commit
aa048efbd3
31
flake.lock
31
flake.lock
|
@ -20,22 +20,41 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695806987,
|
"lastModified": 1699099776,
|
||||||
"narHash": "sha256-fX5kGs66NZIxCMcpAGIpxuftajHL8Hil1vjHmjjl118=",
|
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f3dab3509afca932f3f4fd0908957709bb1c1f57",
|
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"id": "nixpkgs",
|
"owner": "NixOS",
|
||||||
"type": "indirect"
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-stable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1699169573,
|
||||||
|
"narHash": "sha256-cvUb1xZkvOp3W2SzylStrTirhVd9zCeo5utJl9nSIhw=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "aeefe2054617cae501809b82b44a8e8f7be7cc4b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-23.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems": {
|
"systems": {
|
||||||
|
|
|
@ -1,18 +1,21 @@
|
||||||
{
|
{
|
||||||
description = "Automoderation web app";
|
description = "Automoderation web app";
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
inputs.nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils, nixpkgs-stable }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
|
||||||
pname = "some-automoderation";
|
pname = "some-automoderation";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
in {
|
in {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pkgs.go
|
pkgs.go
|
||||||
pkgs.wgo
|
pkgs-stable.wgo
|
||||||
pkgs.semgrep
|
pkgs.semgrep
|
||||||
pkgs.gopls
|
pkgs.gopls
|
||||||
pkgs.nodePackages.tailwindcss
|
pkgs.nodePackages.tailwindcss
|
||||||
|
|
|
@ -32,6 +32,8 @@ func registerPageRoutes(
|
||||||
|
|
||||||
func streamingBsRoute() http.HandlerFunc {
|
func streamingBsRoute() http.HandlerFunc {
|
||||||
return func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
r.ParseForm()
|
||||||
|
queryParam := r.FormValue("mobile")
|
||||||
w.Header().Set("Cache-Control", "no-cache")
|
w.Header().Set("Cache-Control", "no-cache")
|
||||||
w.Header().Set("Connection", "keep-alive")
|
w.Header().Set("Connection", "keep-alive")
|
||||||
w.Header().Set("Content-Type", "text/event-stream")
|
w.Header().Set("Content-Type", "text/event-stream")
|
||||||
|
@ -43,10 +45,10 @@ func streamingBsRoute() http.HandlerFunc {
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
log.Printf("another step in streaming bs")
|
log.Printf("another step in streaming bs")
|
||||||
data := "data: <div>hello with data %d! waited %d</div> \n\n"
|
data := "data: <div>hello with data %d! waited %d. mobile is %s</div> \n\n"
|
||||||
startTime = time.Now().Nanosecond()
|
startTime = time.Now().Nanosecond()
|
||||||
diff := endTime - startTime
|
diff := endTime - startTime
|
||||||
fmt.Fprintf(w, data, rand.Intn(100), diff)
|
fmt.Fprintf(w, data, rand.Intn(100), diff, queryParam)
|
||||||
w.(http.Flusher).Flush()
|
w.(http.Flusher).Flush()
|
||||||
time.Sleep(3 * time.Second)
|
time.Sleep(3 * time.Second)
|
||||||
endTime = time.Now().Nanosecond()
|
endTime = time.Now().Nanosecond()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
|
! tailwindcss v3.3.5 | MIT License | https://tailwindcss.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -550,6 +550,10 @@ video {
|
||||||
display: grid;
|
display: grid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.h-full {
|
.h-full {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
@ -604,6 +608,11 @@ video {
|
||||||
background-color: rgb(251 191 36 / var(--tw-bg-opacity));
|
background-color: rgb(251 191 36 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-blue-100 {
|
||||||
|
--tw-bg-opacity: 1;
|
||||||
|
background-color: rgb(219 234 254 / var(--tw-bg-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
.bg-blue-300 {
|
.bg-blue-300 {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(147 197 253 / var(--tw-bg-opacity));
|
background-color: rgb(147 197 253 / var(--tw-bg-opacity));
|
||||||
|
@ -640,3 +649,13 @@ video {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(185 28 28 / var(--tw-bg-opacity));
|
background-color: rgb(185 28 28 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.md\:block {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.md\:hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -31,11 +31,19 @@
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<div class="h-full w-full grid">
|
<div class="h-full w-full grid">
|
||||||
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
||||||
<div id="state-receival" class="bg-blue-300"
|
<div id="state-receival" class="bg-blue-300 hidden md:block"
|
||||||
hx-ext="sse" sse-connect="/rooms/random">
|
hx-ext="sse" sse-connect="/rooms/random"
|
||||||
|
>
|
||||||
<div> yoyo </div>
|
<div> yoyo </div>
|
||||||
<div sse-swap="message"> qweopop </div>
|
<div sse-swap="message"> qweopop </div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- should be done with custom event for screen change -->
|
||||||
|
<!-- <div id="state-receival" class="bg-blue-100 md:hidden" -->
|
||||||
|
<!-- hx-ext="sse" sse-connect="/rooms/random?mobile=true" -->
|
||||||
|
<!-- > -->
|
||||||
|
<!-- <div> qoqo </div> -->
|
||||||
|
<!-- <div sse-swap="message"> qweopop </div> -->
|
||||||
|
<!-- </div> -->
|
||||||
<div id="controls" class="bg-green-300">
|
<div id="controls" class="bg-green-300">
|
||||||
koko
|
koko
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue