blob: 880096e55c49fef06be0f423ad9cd8e5692cfdc6 [file] [log] [blame] [view]
---
title: InvalidLen
layout: article
---
<!-- Copyright 2023 The Go Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file. -->
<!-- Code generated by generrordocs.go; DO NOT EDIT. -->
```
InvalidLen occurs when an argument to the len built-in function is not of
supported type.
See https://golang.org/ref/spec#Length_and_capacity for information on
which underlying types are supported as arguments to cap and len.
Example:
var s = 2
var x = len(s)
```