Here's the min-max normalization function in Go:
    
    
```go
package main

import (
	"errors"
	"fmt"
	"math"
)

func minMaxNormalization(arr []float64, providedMin *float64, providedMax *float64) ([]float64, error) {
	if len(arr) == 0 {
		return nil, errors.New("Input array cannot be empty")
	}

	var minVal, maxVal float64
	if providedMin != nil && providedMax != nil {
		if *providedMin == *providedMax {
			return nil, errors.New("Provided minimum and maximum values cannot be equal")
		}
		minVal, maxVal = *providedMin, *providedMax
	} else {
		minVal, maxVal = arr[0], arr[0]
		for _, val := range arr {
			if val < minVal {
				minVal = val
			}
			if val > maxVal {
				maxVal = val
			}
		}
	}

	if minVal == maxVal {
		return nil, errors.New("Input array must have at least two distinct values")
	}

	normalizedArr := make([]float64, len(arr))
	for i, val := range arr {
		normalizedArr[i] = (val - minVal) / (maxVal - minVal)
	}

	return normalizedArr, nil
}

func main() {
	arr := []float64{2, 4, 6, 8, 10}
	normalizedArr, err := minMaxNormalization(arr, nil, nil)
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(normalizedArr)
	}

	minVal, maxVal := 0.0, 12.0
	normalizedArr2, err := minMaxNormalization(arr, &minVal, &maxVal)
	if err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(normalizedArr2)
	}
}
```

This Go function has the same functionality as the Python one you provided. It takes an input array and optional minimum and maximum values. If the minimum and maximum values are not provided, it calculates them from the input array. Then, it performs min-max normalization using the specified or calculated minimum and maximum values.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence