project

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package project provides functions to load information of a Golang project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidGoProject

func IsValidGoProject(project ProjectInfo) bool

IsValidGoProject checks if a ProjectInfo instance contains a valid Golang project.

Types

type ProjectInfo

type ProjectInfo struct {
	Name                 string   `json:"name"`                  // name of the golang project
	Path                 string   `json:"path"`                  // path where the project is stored locally
	Package              string   `json:"package"`               // project's module package
	OrganizationPackages []string `json:"organization_packages"` // list of packages patterns (prefix) maintained by the organization
}

A ProjectInfo represents data about a Golang project

func LoadProjectInfo

func LoadProjectInfo(path string) (*ProjectInfo, error)

LoadProjectInfo loads information for a project in the provided `path`.

It returns an error if the path doesn't exist or the path doesn't contain a valid Golang project.

func NewProjectInfo

func NewProjectInfo(name, path, mainPackage string) *ProjectInfo

NewProjectInfo creates a ProjectInfo structure based on received parameters

Jump to

Keyboard shortcuts

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