package main

import "fmt"

func PrintDetails(gunName IGun) {
	fmt.Println("Gun model is ",gunName.getName())
	fmt.Println("Gun power is ",gunName.getPower())
}

func main() {
	ak47,err := GetGun("ak47")
	if err != nil {
		fmt.Println(err)
	}
	musket,err := GetGun("musket")
	if err != nil {
		fmt.Println(err)
	}
	PrintDetails(ak47)
	PrintDetails(musket)

}