Write a Golang program that connects to a MariaDB database, creates a table called "products" with columns for product ID, name, price, and quantity, and performs CRUD operations on the table through user input.

Here's a Golang program that connects to a MariaDB database, creates a table called "products", and performs CRUD operations on the table through user input:

```go
package main

import (
	"database/sql"
	"fmt"
	"log"
	"os"

	_ "github.com/go-sql-driver/mysql"
)

type Product struct {
	ID       int
	Name     string
	Price    float64
	Quantity int
}

func main() {
	db, err := sql.Open("mysql", "username:password@tcp(localhost:3306)/dbname")
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	err = createTable(db)
	if err != nil {
		log.Fatal(err)
	}

	for {
		fmt.Println("\nChoose an operation:")
		fmt.Println("1. Create product")
		fmt.Println("2. Read products")
		fmt.Println("3. Update product")
		fmt.Println("4. Delete product")
		fmt.Println("5. Exit")

		var choice int
		fmt.Scan(&choice)

		switch choice {
		case 1:
			err = createProduct(db)
		case 2:
			err = readProducts(db)
		case 3:
			err = updateProduct(db)
		case 4:
			err = deleteProduct(db)
		case 5:
			os.Exit(0)
		default:
			fmt.Println("Invalid choice.")
			continue
		}

		if err != nil {
			log.Fatal(err)
		}
	}
}

func createTable(db *sql.DB) error {
	query := `CREATE TABLE IF NOT EXISTS products (
		id INT AUTO_INCREMENT,
		name VARCHAR(255) NOT NULL,
		price DECIMAL(10, 2) NOT NULL,
		quantity INT NOT NULL,
		PRIMARY KEY (id)
	);`

	_, err := db.Exec(query)
	return err
}

func createProduct(db *sql.DB) error {
	var p Product

	fmt.Print("Enter product name: ")
	fmt.Scan(&p.Name)

	fmt.Print("Enter product price: ")
	fmt.Scan(&p.Price)

	fmt.Print("Enter product quantity: ")
	fmt.Scan(&p.Quantity)

	query := "INSERT INTO products (name, price, quantity) VALUES (?, ?, ?)"
	_, err := db.Exec(query, p.Name, p.Price, p.Quantity)

	if err == nil {
		fmt.Println("Product created successfully.")
	}
	return err
}

func readProducts(db *sql.DB) error {
	rows, err := db.Query("SELECT id, name, price, quantity FROM products")
	if err != nil {
		return err
	}
	defer rows.Close()

	fmt.Printf("\n%-5s %-20s %-10s %s\n", "ID", "Name", "Price", "Quantity")

	for rows.Next() {
		var p Product
		err = rows.Scan(&p.ID, &p.Name, &p.Price, &p.Quantity)
		if err != nil {
			return err
		}
		fmt.Printf("%-5d %-20s %-10.2f %d\n", p.ID, p.Name, p.Price, p.Quantity)
	}

	return rows.Err()
}

func updateProduct(db *sql.DB) error {
	var p Product

	fmt.Print("Enter product ID to update: ")
	fmt.Scan(&p.ID)

	fmt.Print("Enter new product name: ")
	fmt.Scan(&p.Name)

	fmt.Print("Enter new product price: ")
	fmt.Scan(&p.Price)

	fmt.Print("Enter new product quantity: ")
	fmt.Scan(&p.Quantity)

	query := "UPDATE products SET name=?, price=?, quantity=? WHERE id=?"
	result, err := db.Exec(query, p.Name, p.Price, p.Quantity, p.ID)

	if err == nil {
		rowsAffected, _ := result.RowsAffected()
		if rowsAffected == 0 {
			fmt.Println("No product found with the given ID.")
		} else {
			fmt.Println("Product updated successfully.")
		}
	}
	return err
}

func deleteProduct(db *sql.DB) error {
	var id int

	fmt.Print("Enter product ID to delete: ")
	fmt.Scan(&id)

	query := "DELETE FROM products WHERE id=?"
	result, err := db.Exec(query, id)

	if err == nil {
		rowsAffected, _ := result.RowsAffected()
		if rowsAffected == 0 {
			fmt.Println("No product found with the given ID.")
		} else {
			fmt.Println("Product deleted successfully.")
		}
	}
	return err
}
```

Before running this program, make sure you have installed the MariaDB server and created a database. Replace `username`, `password`, and `dbname` in the connection string with your actual username, password, and database name.

To run the program, first install the required package:

```sh
go get -u github.com/go-sql-driver/mysql
```

Then compile and run the program:

```sh
go build main.go
./main
```

The program will prompt you to choose an operation (create, read, update, or delete). Follow the prompts to perform CRUD operations on the "products" table.