MCPcopy Create free account
hub / github.com/ByteYellow/AgentProvenance / intQuery

Function intQuery

internal/daemon/server.go:933–943  ·  view source on GitHub ↗
(r *http.Request, key string, fallback int)

Source from the content-addressed store, hash-verified

931}
932
933func intQuery(r *http.Request, key string, fallback int) (int, error) {
934 raw := strings.TrimSpace(r.URL.Query().Get(key))
935 if raw == "" {
936 return fallback, nil
937 }
938 value, err := strconv.Atoi(raw)
939 if err != nil {
940 return 0, fmt.Errorf("invalid %s query parameter", key)
941 }
942 return value, nil
943}
944
945func writeResult(w http.ResponseWriter, data any, err error) {
946 if err != nil {

Callers 6

listTelemetryEventsMethod · 0.85
listTelemetryWindowsMethod · 0.85
graphExplainMethod · 0.85
graphLensMethod · 0.85
observeSummaryMethod · 0.85
timelineMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected