You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: inventory.go
    path of file: ./repos/arduino-cli/internal/inventory
    
    the code of the file until where you have to start completion: // This file is part of arduino-cli.
//
// Copyright 2020 ARDUINO SA (http://www.arduino.cc/)
//
// This software is released under the GNU General Public License version 3,
// which covers the main part of arduino-cli.
// The terms of this license can be found at:
// https://www.gnu.org/licenses/gpl-3.0.en.html
//
// You can be released from the requirements of the above licenses by purchasing
// a commercia
    
func Init(configPath string) error {
	configFilePath = filepath.Join(configPath, Name)
	Store.SetConfigName(Name)
	Store.SetConfigType(Type)
	Store.AddConfigPath(configPath)
	// Attempt to read config file
	if err := Store.ReadInConfig(); err != nil {
		if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
			// If an error occurs during initialization of the store, just log it and recreate it from scratch.
			logrus.WithError(err).Error("Error loading inventory store")
		}
		if err := generateInstallationData(); err != nil {
			return err
		}
		if err := WriteStore(); err != nil {
			return err
		}
	}

	return nil
}