Benign go Download

github.com/asciich/asciichgolangpublic v0.674.0

GitHub Actions workflow definition pathmcp-go module import path
SHA-25614aac1aa2a753f74e646c4e04e8226aaa4a7aad735ffe7adb166c92d78debdea
MaleculeH₂(Cm₂F)

Evidence

imports encoding/json lines 1–22
1package chromautils
2
3import (
4 "bytes"
5 "context"
6 "encoding/json"
7 "fmt"
8 "io"
9 "net/http"
10 "sort"
11 "strconv"
12 "time"
13
14 "github.com/mark3labs/mcp-go/mcp"
15 "github.com/mark3labs/mcp-go/server"
16 "github.com/asciich/asciichgolangpublic/pkg/logging"
17 "github.com/asciich/asciichgolangpublic/pkg/tracederrors"
18)
19
20type McpQueryResult struct {
21 IDs [][]string `json:"ids"`
22 Documents …
Go JSON marshal call lines 33–39
33:33… string, texts []string) ([][]float32, error) {
34 reqBody, err := json.Marshal(map[string]interface{}{
35 "model": DEFAULT_EMBEDDING_MODEL_NAME,
36 "input": texts,
37 })
38 if err != nil {
39 return nil, tracederr …
Go HTTP Post method call lines 39–43
39:38… rf("Failed to marshal embed request: %w", err)
40 }
41 resp, err := http.Post(ollamaURL+"/api/embed", "application/json", bytes.NewReader(reqBody))
42 if err != nil {
43 return nil, tracederrors.TracedErrorf("F …
Go reads an HTTP response body lines 45–55
45:14… ody.Close()
46 if resp.StatusCode != http.StatusOK {
47 body, _ := io.ReadAll(resp.Body)
48 return nil, tracederrors.TracedErrorf("ollama embed failed (%d): %s", resp.StatusCode, body)
49 }
50 var result struct {
51 Embeddings [][]float32 `json:"embeddings"`
52 }
53 if err := json.NewDecoder(resp.Body).Decode(&result); err != nil {
54 return nil, tracederrors.TracedErrorf("Failed to decode ollama response: %w", err)
55 …
Go strconv.Atoi call lines 285–293
285:11… i
286 if len(id) > 4 && id[:4] == "doc_" {
287 if parsed, err := strconv.Atoi(id[4:]); err == nil {
288 idx = parsed
289 }
⋯4 lines

Showing the top 5 files — 1 more file (14 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.