Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 22, 2022 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/452d4deae953219ccc1b91246bd00d9b to your computer and use it in GitHub Desktop.
Save parzibyte/452d4deae953219ccc1b91246bd00d9b to your computer and use it in GitHub Desktop.
func existeProducto(productos []ProductoVendidoParaGrafica, productoBuscado ProductoVendidoParaGrafica) int {
for indice, producto := range productos {
if producto.IdProducto == productoBuscado.IdProducto {
return indice
}
}
return -1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment