extractor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	Name, Version, URL, FilePath string
}

func FromJsonManifest

func FromJsonManifest(jsonData []byte) ([]Dependency, error)

FromJsonManifest reads json-data and returns the dependencies list from it. Expected json-data format:

{ "dependencies": { "Name": "1.2.3", "Another": "0.0.1" } }

func FromPropertiesFile

func FromPropertiesFile(fileData []byte) ([]Dependency, error)

FromPropertiesFile reads sketch properties file and extracts found dependencies. File format:

dependencies=Servo@1.1.7, GyverOLED@1.0, https://github.com/arduino-libraries/Servo.git, /tmp/lib.zip

func FromTextFile

func FromTextFile(fileData []byte) ([]Dependency, error)

FromTextFile reads raw text data and extracts found dependencies. Text file format:

# comment
; comment
// comment

Servo@1.1.7
With Space@1.2.3
Without version
https://github.com/arduino-libraries/Servo.git
/tmp/lib.zip

Jump to

Keyboard shortcuts

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