MCPcopy
hub / github.com/github/github-mcp-server / convertStringSliceToBigIntSlice

Function convertStringSliceToBigIntSlice

pkg/github/params.go:271–281  ·  view source on GitHub ↗
(s []string)

Source from the content-addressed store, hash-verified

269}
270
271func convertStringSliceToBigIntSlice(s []string) ([]int64, error) {
272 int64Slice := make([]int64, len(s))
273 for i, str := range s {
274 val, err := convertStringToBigInt(str, 0)
275 if err != nil {
276 return nil, fmt.Errorf("failed to convert element %d (%s) to int64: %w", i, str, err)
277 }
278 int64Slice[i] = val
279 }
280 return int64Slice, nil
281}
282
283func convertStringToBigInt(s string, def int64) (int64, error) {
284 v, err := strconv.ParseInt(s, 10, 64)

Callers 1

OptionalBigIntArrayParamFunction · 0.85

Calls 1

convertStringToBigIntFunction · 0.85

Tested by

no test coverage detected