language

package
v0.0.0-...-45a9bcf Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package language provides functionality to detect the programming language for a given process.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language string

Language represents programming languages.

const (
	// Unknown is used when the language could not be detected.
	Unknown Language = "UNKNOWN"
	// Java represents JVM languages.
	Java Language = "jvm"
	// Node represents Node.js.
	Node Language = "nodejs"
	// Python represents Python.
	Python Language = "python"
	// Ruby represents Ruby.
	Ruby Language = "ruby"
	// DotNet represents .Net.
	DotNet Language = "dotnet"
	// Go represents Go.
	Go Language = "go"
	// CPlusPlus represents C++.
	CPlusPlus Language = "cpp"
	// PHP represents PHP.
	PHP Language = "php"
)

func FindInArgs

func FindInArgs(exe string, args []string) Language

FindInArgs tries to detect the language only using the provided command line arguments.

func FindUsingPrivilegedDetector

func FindUsingPrivilegedDetector(detector privileged.LanguageDetector, pid int32) Language

FindUsingPrivilegedDetector tries to detect the language using the provided command line arguments

type ProcessInfo

type ProcessInfo struct {
	Args []string
	Envs map[string]string
}

ProcessInfo holds information about a process.

Directories

Path Synopsis
Package reader provides utils around io.Reader.
Package reader provides utils around io.Reader.

Jump to

Keyboard shortcuts

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