blob: a65394083ddaa51d8b9af239d6fc78e64db40931 [file] [view]
---
title: UnaddressableFieldAssign
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. -->
```
UnaddressableFieldAssign occurs when trying to assign to a struct field
in a map value.
Example:
func f() {
m := make(map[string]struct{i int})
m["foo"].i = 42
}
```