languagemodels

package
v0.0.0-...-c68ee8d Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector interface {
	DetectLanguage(proc Process) (Language, error)
}

Detector is an interface for detecting the language of a process

type Language

type Language struct {
	Name    LanguageName
	Version string
}

Language contains metadata collected from the call to `DetectLanguage`

type LanguageName

type LanguageName string

LanguageName is a string enum that represents a detected language name.

const (
	// Go language name.
	Go LanguageName = "go"

	// Node language name.
	Node LanguageName = "node"

	// Dotnet language name.
	Dotnet LanguageName = "dotnet"

	// Python language name.
	Python LanguageName = "python"

	// Java language name.
	Java LanguageName = "java"

	// Ruby language name.
	Ruby LanguageName = "ruby"

	// PHP language name.
	PHP LanguageName = "php"

	// Unknown language name.
	Unknown LanguageName = ""
)

type Process

type Process interface {
	GetPid() int32
	GetCommand() string
	GetCmdline() []string
}

Process is an interface that exposes the fields necessary to detect a language

Jump to

Keyboard shortcuts

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