gocheckdeb

package
v0.0.0-...-6b440f0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package gocheckdeb is to get go packages and check if they are packaged for debian or not.

Index

Constants

View Source
const (
	// GoDebBinariesURL is the url of binary list of go lang
	GoDebBinariesURL = "https://api.ftp-master.debian.org/binary/by_metadata/Go-Import-Path"
)

Variables

View Source
var ProjectName string

ProjectName is to store the current project which is being checked

View Source
var VendorUsed bool

VendorUsed is to flag if the vendor folder is used or not

Functions

func DirectoryExist

func DirectoryExist(path string) bool

DirectoryExist is to check if a directory exist in GoPath

func Err

func Err(err error)

Err is to log the error

func FileExist

func FileExist(path string) bool

FileExist is check if file exist

func GetAllPkg

func GetAllPkg(project string) error

GetAllPkg is to get projects at once

func GetGoPath

func GetGoPath() (string, error)

GetGoPath is to get $GOPATH environment variable

func GetImports

func GetImports(project, importType string) ([]string, error)

GetImports is to get first level dependencies of a project

func GetPkg

func GetPkg(project string) error

GetPkg is to get project

func GetProjectPath

func GetProjectPath(project string) (string, error)

GetProjectPath is to get full project path

func GetURLStatus

func GetURLStatus(project string) (bool, error)

GetURLStatus is to get the status of a package

func MapToSlice

func MapToSlice(m LevelMap) []string

MapToSlice is to convert a LevelMap into slice

func PrintDep

func PrintDep(m DepMap, debFilter bool, displayAll bool, i int)

PrintDep is to print the DepMap

func SearchDebPackage

func SearchDebPackage(name string) bool

SearchDebPackage is to search for a deb package

Types

type DepMap

type DepMap struct {
	// contains filtered or unexported fields
}

DepMap is the map of dependencies

var DepGraph DepMap

DepGraph is the graph of packages.

func GetDep

func GetDep(project string, getType string, returnType string) (DepMap, error)

GetDep is the on function to get graph or map of dependencies

func GetDepRecursive

func GetDepRecursive(project string, getType string, returnType string) (DepMap, error)

GetDepRecursive is to get the recursive map of dependencies

func SliceToDepMap

func SliceToDepMap(slice []string) DepMap

SliceToDepMap is to convert a slice into a DepMap

type GoDebBinaryStruct

type GoDebBinaryStruct struct {
	Binary         string `json:"binary"`
	XSGoImportPath string `json:"metadata_value"`
	Source         string `json:"source"`
}

GoDebBinaryStruct is the structere of json

type LevelMap

type LevelMap map[string]string

LevelMap is a single level dependencies map

var GoBinaries LevelMap

GoBinaries is the map of already packaged binaries

var StdMap LevelMap

StdMap is to store standard packages

func GetGoDebBinaries

func GetGoDebBinaries() (LevelMap, error)

GetGoDebBinaries is to get the complete list of all the binaries packaged in debian

func RemoveMap

func RemoveMap(mainMap, needleMap LevelMap) LevelMap

RemoveMap is to remove key of mainMap which are present in needleMap

func SliceToMap

func SliceToMap(slice []string) LevelMap

SliceToMap is to convert a slice into a map

Jump to

Keyboard shortcuts

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