Socket
Book a DemoInstallSign in
Socket

open.boneffect.de/libs/vcsaccess

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open.boneffect.de/libs/vcsaccess

Go Modules
Version
v0.0.0-20230904132446-2f8aa85a61bb
Version published
Created
Source

vcsaccess

Interface for Version Control System access using Go

Status: In Development License: Apache v2.0

Summary

vcsaccess defines an interface for read access to a version control system repository, plus an implementation for this interface that wraps the git command for repositories on disk.

Note that the interface only defines a rather minimal subset of a typical VCSs capabilities. This is an intentional simplification; this library does not claim completeness.

This library is implemented in the Go programming language. It uses the golangci-lint and REUSE linters for basic quality control.

vcsaccess is brought to you by boneffect software solutions.

Usage

vcsaccess can be installed using:

go get open.boneffect.de/libs/vcsaccess

The following example loads a Git repository from disk and prints its commit history:

repo, err := vcsaccess.OpenGitRepository(ctx, path)
handleError(err)

commitInfos, err := repo.CommitHistory(ctx, "HEAD", nil, nil)
handleError(err)

for _, commitInfo := range commitInfos {
    fmt.Printf("%s %s %s\n", commitInfo.Hash, commitInfo.AuthorTimestamp.Format(time.RFC3339), commitInfo.Message) //nolint:forbidigo
}

You can find the full source code at examples/show-history/main.go.

vcsaccess is documented using doc comments that can be rendered in the documentation viewer or IDE of your choice. It is recommended to read the file interface.go.

Contributing

vcsaccess is developed on the collaborative development platform Codeberg, at https://codeberg.org/boneffect/vcsaccess. If you have a Codeberg account, you can contribute to the project by posting issues or pull requests there.

If you don't have or don't want a Codeberg account, you can alternatively contribute via email - see the Contact section below.

When contributing code or patches, make sure that you keep the code clean and simple, aim for high test coverage and make sure that you add your name to the copyright headers. When using third-party code, you must include all necessary attribution notices. Do not contribute code that is under an incompatible license. Keep third-party code to a minimum and prefer to import third-party code using Go Modules, unless that pulls in unnecessary transitive dependencies.

Note that the repository at Codeberg is directed at contributors only. Please do not send support inquiries to the issue tracker, see the Contact section below instead. Releases of vcsaccess are published at https://open.boneffect.de/libs/vcsaccess.

vcsaccess is (C) 2023 boneffect software solutions Lucas Hinderberger

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Be aware that vcsaccess depends on third-party code (which in turn might include further dependencies) that may be under a different license.

For details, please refer to the LICENSE file.

Contact

You can contact the maintainer via the abovementioned issue tracker or, if you prefer, via email at info@boneffect.de.

Further contact information is published at: https://www.boneffect.de/impressum

The privacy policy of boneffect software solutions is published at: https://www.boneffect.de/datenschutz

FAQs

Package last updated on 04 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts