(raw string)
| 2069 | } |
| 2070 | |
| 2071 | func parseNetworkExpiresAt(raw string) (*int64, error) { |
| 2072 | trimmed := strings.TrimSpace(raw) |
| 2073 | if trimmed == "" { |
| 2074 | return nil, nil |
| 2075 | } |
| 2076 | if unixSeconds, err := strconv.ParseInt(trimmed, 10, 64); err == nil { |
| 2077 | return &unixSeconds, nil |
| 2078 | } |
| 2079 | |
| 2080 | parsed, err := time.Parse(time.RFC3339, trimmed) |
| 2081 | if err != nil { |
| 2082 | return nil, errors.New("cli: --expires-at must be unix seconds or RFC3339") |
| 2083 | } |
| 2084 | unixSeconds := parsed.UTC().Unix() |
| 2085 | return &unixSeconds, nil |
| 2086 | } |
| 2087 | |
| 2088 | func networkCompactExt(ext map[string]json.RawMessage) string { |
| 2089 | if len(ext) == 0 { |
no outgoing calls
no test coverage detected