console v0.4.5: русификация UI, Go/TF предупреждения, handler.go в preferred

This commit is contained in:
Naeel
2026-04-15 19:47:41 +03:00
parent fd236d87ea
commit c40fc47025
7 changed files with 259 additions and 98 deletions
+3
View File
@@ -0,0 +1,3 @@
module github.com/user/fn
go 1.23
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"fmt"
"net/http"
)
// Handler — точка входа для Fission go-env.
// Go builder компилирует этот файл в .so плагин,
// go-env загружает его через plugin.Open().
func Handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello from real Go in Fission (builder pipeline)")
}
-26
View File
@@ -1,26 +0,0 @@
package main
import "fmt"
// Handler используется binary-env: binary получает HTTP request через stdin,
// stdout является HTTP response body.
//
// Для деплоя нужно скомпилировать перед terraform apply:
// CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o ../dist/handler .
//
// Compiled size: ~1.6MB (слишком велико для literal deployment).
// Используется shell-based handler в dist/handler (см. ниже).
func main() {
fmt.Print("Hello from Go in Fission")
}
package main
import (
"fmt"
"net/http"
)
func Handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello from Go in Fission")
}