MCPcopy Index your code
hub / github.com/0xUnixIO/pulse / parseExpireAt

Function parseExpireAt

internal/serverapi/api.go:879–890  ·  view source on GitHub ↗
(s *string)

Source from the content-addressed store, hash-verified

877}
878
879func parseExpireAt(s *string) *time.Time {
880 if s == nil || *s == "" {
881 return nil
882 }
883 for _, layout := range []string{time.RFC3339, "2006-01-02"} {
884 if t, err := time.Parse(layout, *s); err == nil {
885 u := t.UTC()
886 return &u
887 }
888 }
889 return nil
890}

Callers 2

handleNodesMethod · 0.70
handleNodeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected