console v0.4.5: русификация UI, Go/TF предупреждения, handler.go в preferred
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
module github.com/user/fn
|
||||
|
||||
go 1.23
|
||||
@@ -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)")
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
Reference in New Issue
Block a user