Matheus Sampaio Queiroga 8cf5fcbfc3
All checks were successful
Golang test / go-test (pull_request) Successful in 21s
Golang test / go-test (push) Successful in 21s
Refactor deb822 package: Remove deprecated files and implement new encoding/decoding logic
- Deleted old deb822_encode.go and deb822_types.go files.
- Introduced new deb822_encode.go with improved Marshall function and Writer struct for encoding.
- Added deb822_decode.go for decoding functionality with enhanced error handling.
- Created deb822_rawdata.go to define RawData type for handling raw deb822 values.
- Implemented Description type in deb822/datatype/description.go for structured description handling.
- Updated Package struct in dpkg/header.go to use new Description type.
- Refactored UnmarshalBinary method in dpkg/header.go to utilize new deb822 decoding logic.
- Added comprehensive tests for encoding and decoding in deb822_encode_test.go and deb822_decode_test.go.
- Removed internal scanner package as it was no longer needed.

Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
2025-06-22 22:05:41 -03:00
2025-06-09 00:29:59 -03:00
2025-06-09 00:29:59 -03:00
2025-03-13 14:40:14 -03:00
2025-03-13 14:40:14 -03:00

go-dpkg

go-dpkg is a Go library for parsing and working with Debian package files (.deb). This library provides utilities to extract and manipulate the contents of Debian packages, making it easier to integrate Debian package management into your Go applications.

Features

  • Parse Debian package files (.deb)
  • Extract package metadata
  • Manipulate package contents
  • Easy integration with Go applications

Installation

To install go-dpkg, use go get:

go get sirherobrine23.com.br/sirherobrine23/go-dpkg

Usage

Here is a simple example of how to use go-dpkg to parse a Debian package file:

package main

import (
  "fmt"
  "log"
  "sirherobrine23.com.br/sirherobrine23/go-dpkg/dpkg"
)

func main() {
  pkg, err := dpkg.Open("example.deb")
  if err != nil {
    log.Fatal(err)
  }

  fmt.Println("Package Name:", pkg.Name)
  fmt.Println("Version:", pkg.Version)
  fmt.Println("Architecture:", pkg.Architecture)
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Contact

For any questions or suggestions, please open an issue.

Description
Debian package manipulation
Readme GPL-2.0 14 MiB
Languages
Go 100%