blob: 08614c607c991810133847a7cc5085161752fced [file] [view]
---
title: BadOffsetofSyntax
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. -->
```
BadOffsetofSyntax occurs when unsafe.Offsetof is called with an argument
that is not a selector expression.
Example:
import "unsafe"
var x int
var _ = unsafe.Offsetof(x)
```