package main

import (
	"testing"
)

// Função com retornos nomeados
func somaNomeados(a, b int) (resultado int, err error) {
	resultado = a + b
	return
}

// Função com retornos explícitos
func somaExplicitos(a, b int) (int, error) {
	return a + b, nil
}

func BenchmarkSomaNomeados(b *testing.B) {
	for i := 0; i < b.N; i++ {
		somaNomeados(1, 2)
	}
}

func BenchmarkSomaExplicitos(b *testing.B) {
	for i := 0; i < b.N; i++ {
		somaExplicitos(1, 2)
	}
}
