god
github.com/stapelberg/godebiancontrol
go get github.com/stapelberg/godebiancontrol
god

github.com/stapelberg/godebiancontrol

Golang debian control file parser

by Michael Stapelberg

v0.0.0-20180408134423-8c93e189186a (see all)License:BSD-3-Clause
go get github.com/stapelberg/godebiancontrol
Readme

Maintenance mode

Note that new projects should prefer to use https://pault.ag/go/debian instead of this package.

Usage

Install:

go get github.com/stapelberg/godebiancontrol

…and then use it in your code:

package main

import (
    "github.com/stapelberg/godebiancontrol"
    "os"
    "log"
)
    
func main() {
    file, err := os.Open("/var/lib/apt/lists/http.debian.net_debian_dists_testing_main_binary-amd64_Packages")
    if err != nil {
        log.Fatal(err)
    }
    defer file.Close()
        
    p, err := godebiancontrol.Parse(file)
    if err != nil {
        log.Fatal(err)
    }
    log.Printf("The first package in the list is %s\n", p[0]["Package"])
}

Find the documentation at:

https://godoc.org/github.com/stapelberg/godebiancontrol

GitHub Stars

11

LAST COMMIT

4yrs ago

MAINTAINERS

0

CONTRIBUTORS

4

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20140607120301-157e2f8a8f43
3yrs ago
v0.0.0-20180408134423-8c93e189186a
3yrs ago
No alternatives found
No tutorials found
Add a tutorial