mirror of
https://github.com/hanzoai/embeddings.git
synced 2026-10-30 18:37:33 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers; omitzero is not applied, since it changes what the JSON says. Co-Authored-By: Claude Opus 5 <[email protected]>
23 KiB
23 KiB
package main
import (
"fmt"
"net/http"
"os"
"strings"
)
const startupMessage = `
�
��������
������� �
�� �� �� ��� �� ������� � ����
� ���� ���� ���� � � ���
� � �� ��� ���� �����
� ����������� � ���������
����� ���� ����������
� �������
� � � ����������� �
� � �� �� � � ���������������� ��
��� � �� � �����������������
`
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello! you've requested %s\n", r.URL.Path)
})
port := os.Getenv("PORT")
if port == "" {
port = "80"
}
for line := range strings.SplitSeq(startupMessage, "\n") {
fmt.Println(line)
}
fmt.Printf("Server listening at :%s 🚀\n", port)
err := http.ListenAndServe(fmt.Sprintf(":%s", port), nil)
if err != nil {
panic(err)
}
}
import (
"fmt"
"net/http"
"os"
"strings"
)
const startupMessage = `
�
��������
������� �
�� �� �� ��� �� ������� � ����
� ���� ���� ���� � � ���
� � �� ��� ���� �����
� ����������� � ���������
����� ���� ����������
� �������
� � � ����������� �
� � �� �� � � ���������������� ��
��� � �� � �����������������
`
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello! you've requested %s\n", r.URL.Path)
})
port := os.Getenv("PORT")
if port == "" {
port = "80"
}
for line := range strings.SplitSeq(startupMessage, "\n") {
fmt.Println(line)
}
fmt.Printf("Server listening at :%s 🚀\n", port)
err := http.ListenAndServe(fmt.Sprintf(":%s", port), nil)
if err != nil {
panic(err)
}
}