> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntblaze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Go Dereference

The `*` operator in Go is a context-dependent token that serves three distinct syntactic and semantic functions: pointer indirection (dereferencing), pointer type declaration, and arithmetic multiplication.

## 1. Pointer Indirection (Dereferencing)

As a unary prefix operator, `*` performs indirection on a pointer operand. It resolves the memory address held by the pointer and yields the underlying value. The result of a pointer indirection is **addressable**, meaning it can be used both to evaluate the value at an address and to assign a new value to mutate the underlying memory. If the pointer operand evaluates to `nil`, evaluating or assigning to the indirection will cause a runtime panic.

```go theme={"dark"}
x := 10
ptr := &x           // ptr is initialized with the address of x

var val int = *ptr  // Evaluates the value at the memory address stored in ptr
*ptr = 42           // Mutates the memory at the address stored in ptr (x becomes 42)
```

## 2. Pointer Type Declaration

In type declarations, variable declarations, and function signatures, `*` acts as a type constructor. It denotes a composite type that represents a pointer to a specific base type. The base type dictates the memory layout, size, and alignment of the data being pointed to.

```go theme={"dark"}
type Node struct{}
type DataStruct struct{}

var p *int                                // Declares p as type "pointer to int"
type NodePtr *Node                        // Defines a custom pointer type

func process(data *DataStruct) *byte {    // Used in parameter and return type signatures
    return nil
}
```

## 3. Arithmetic Multiplication

As a binary infix operator, `*` performs arithmetic multiplication. It requires two numeric operands of identical types (or untyped constants that can be implicitly converted to a common type) and yields a product of that same type.

```go theme={"dark"}
var product float64 = 3.14 * 2.0  // Binary multiplication
```

<div
  style={{ 
display: "flex", 
justifyContent: "space-between", 
alignItems: "center", 
maxWidth: "754px", 
padding: "1rem 0",
marginBottom: "24px"
}}
>
  <span style={{ fontWeight: "bold", fontSize: "1.25rem", color: "var(--tw-prose-headings)", fontFamily: "Inter, ui-sans-serif, system-ui, sans-serif" }}>Tired of Poor Go Skills? Fix That With Deep Grasping!</span>

  <a
    href="https://syntblaze.com"
    target="_blank"
    style={{ 
  marginLeft: "24px",
  textDecoration: "none", 
  backgroundColor: "#007AFF",
  color: "#ffffff", 
  padding: "6px 16px", 
  borderRadius: "16px",
  fontSize: "0.9rem",
  fontWeight: "600",
  textAlign: "center",
  transition: "background-color 0.2s ease"
}}
  >
    Learn More
  </a>
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/skill-tracking.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=b9b0305c93bb501c9e767b5c76c88835" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/skill-tracking.png" />

  <img src="https://mintcdn.com/syntblazellc/23tyuOzaWS88qFlc/images/nuggets.png?fit=max&auto=format&n=23tyuOzaWS88qFlc&q=85&s=c86c80197299762989e9b882419b2109" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/nuggets.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/bite-sized-exercises.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=a65f9a38c37ff28ab73ed783c53c60e3" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/bite-sized-exercises.png" />
</div>

<div style={{ display: "flex", gap: "12px", flexWrap: "wrap", marginTop: "12px" }}>
  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/mastery-chain.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=748a1763454713e679260fbb95f154a2" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/mastery-chain.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-previews.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=242f61448ff5dd6deaaab2dccc13b507" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-previews.png" />

  <img src="https://mintcdn.com/syntblazellc/-L0ums_2lctDSZ1l/images/element-explanations.png?fit=max&auto=format&n=-L0ums_2lctDSZ1l&q=85&s=cf0fc1c31f9cd0fc26716781be05fbc9" style={{ width: "30%", minWidth: 60 }} width="621" height="1344" data-path="images/element-explanations.png" />
</div>
