cart

package
v0.0.0-...-a04e50b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

cart/cart.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cart

type Cart struct {
	Items map[int]int
}

Cart represents a shopping cart.

func NewCart

func NewCart() *Cart

NewCart creates a new shopping cart.

func (*Cart) AddToCart

func (c *Cart) AddToCart(productID, quantity int)

AddToCart adds a specified quantity of a product to the cart.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL