MCPcopy Create free account
hub / github.com/compozy/agh / parseMemoryLimit

Function parseMemoryLimit

internal/api/core/memory.go:2567–2577  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

2565}
2566
2567func parseMemoryLimit(raw string) (int, error) {
2568 trimmed := strings.TrimSpace(raw)
2569 if trimmed == "" {
2570 return 0, nil
2571 }
2572 limit, err := strconv.Atoi(trimmed)
2573 if err != nil || limit <= 0 {
2574 return 0, NewMemoryValidationError(errors.New("limit must be a positive integer"))
2575 }
2576 return limit, nil
2577}
2578
2579func parseMemoryHistoryQuery(c *gin.Context) (memcontract.OperationHistoryQuery, error) {
2580 scope, workspace, err := resolveMemoryScopeAndWorkspace(

Callers 4

memoryDreamListQueryMethod · 0.85
parseMemoryHistoryQueryFunction · 0.85

Calls 1

NewMemoryValidationErrorFunction · 0.85

Tested by

no test coverage detected