MCPcopy Index your code
hub / github.com/labstack/echo / uints

Method uints

binder.go:805–864  ·  view source on GitHub ↗
(sourceParam string, values []string, dest any)

Source from the content-addressed store, hash-verified

803}
804
805func (b *ValueBinder) uints(sourceParam string, values []string, dest any) *ValueBinder {
806 switch d := dest.(type) {
807 case *[]uint64:
808 tmp := make([]uint64, len(values))
809 for i, v := range values {
810 b.uint(sourceParam, v, &tmp[i], 64)
811 if b.failFast && b.errors != nil {
812 return b
813 }
814 }
815 if b.errors == nil {
816 *d = tmp
817 }
818 case *[]uint32:
819 tmp := make([]uint32, len(values))
820 for i, v := range values {
821 b.uint(sourceParam, v, &tmp[i], 32)
822 if b.failFast && b.errors != nil {
823 return b
824 }
825 }
826 if b.errors == nil {
827 *d = tmp
828 }
829 case *[]uint16:
830 tmp := make([]uint16, len(values))
831 for i, v := range values {
832 b.uint(sourceParam, v, &tmp[i], 16)
833 if b.failFast && b.errors != nil {
834 return b
835 }
836 }
837 if b.errors == nil {
838 *d = tmp
839 }
840 case *[]uint8: // byte is alias to uint8
841 tmp := make([]uint8, len(values))
842 for i, v := range values {
843 b.uint(sourceParam, v, &tmp[i], 8)
844 if b.failFast && b.errors != nil {
845 return b
846 }
847 }
848 if b.errors == nil {
849 *d = tmp
850 }
851 case *[]uint:
852 tmp := make([]uint, len(values))
853 for i, v := range values {
854 b.uint(sourceParam, v, &tmp[i], 0)
855 if b.failFast && b.errors != nil {
856 return b
857 }
858 }
859 if b.errors == nil {
860 *d = tmp
861 }
862 }

Callers 2

bindWithDelimiterMethod · 0.95
uintsValueMethod · 0.95

Calls 1

uintMethod · 0.95

Tested by

no test coverage detected