darkowlzz


dep - Solve Errors

5 minute read Published:

dep seems to work great for those who are able to get it to work with their projects. But often, there are issues that a new dep user faces while trying out dep for the first time. The issues when dep fails to solve the dependency graph. When this happens, dep needs some help from the user to solve the issue. A lot of people find it hard to get started with dep when the very first command, dep init fails and they don’t know how to go ahead with that.

Lastpass Cli Helpers

1 minute read Published:

lpass is a lastpass cli client with a lot of subcommands and options to do a lot of things which are hard to remember. Based on my day-to-day usage of it, I created a set of bash functions to simplify the usage. An up-to-date version of the functions can be found here. There are four functions: lpget() to get the password of a given site. $ lpget google.com copied google.com secret to clipboard lpuser() to get the username of a given site.

dep - Pin Executable Version

2 minute read Published:

Along with managing project dependencies, dep also provides a way to manage the development tools (linters, generators, etc) to be used with the project. This can be done by adding the tool’s full package path in the required field in the manifest file (Gopkg.toml). Unlike other fields, required considers packages, not project. Hence, if a project wants to install a tool, say dep, required should contain github.com/golang/dep/cmd/dep. required = ["github.com/golang/dep/cmd/dep"] If a project doesn’t contain any import path of a package, required field can be used to tell dep to include that.

dep - Picking Version From GOPATH

2 minute read Published:

This post is about a feature in golang/dep that could be used by developers who are not using vendor directory to vendor their dependencies, but depend on the version of the dependencies checked out in their GOPATH. dep provides a subcommand, dep init, for initializing a go project to use dep. It creates two files, a manifest file, called Gopkg.toml, and a lock file, called Gopkg.lock. These files contain details about all the dependencies analyzed by dep while initializing.

go-git - Grep

3 minute read Published:

go-git now supports git-grep. Follow the “go-git” tag to read other go-git related posts. git-grep The Amazing Worktree Grep Options Option Validation Grep Result git-grep git-grep - Print lines matching a pattern git-scm.com git-grep performs pattern matching in the tracked files in the work tree, blobs registered in the index files, or blobs in given tree objects. The result of match is sent to stdout, which consists of filename and content of the line.

go-git - Clean

2 minute read Published:

go-git now supports git-clean. Follow the “go-git” tag to read other go-git related posts. Git provides a way to clean the working tree by deleting any untracked files with the git clean command. By default, git clean would delete any untracked files. Untracked (empty) directories are not deleted. To delete them, -d option can be passed. Since clean can be harmful if not used carefully, git wouldn’t just delete the files.

go-git - Object Alternates

2 minute read Published:

This is another git related post coming out of more contributions to the src-d/go-git project. Other related post can be found by following the “go-git” tag at the bottom of this page. Git clone offers an option to clone a repo without actually copying the git objects to a new location, but sharing the objects with the new repo. This can be done by using the --shared or -s option. It’s for local repos only.

go-git - Tag Signature Verification

3 minute read Published:

This post is also a sequel of other posts related to git and signature verification (Git Commit Signature Verification and Git Commit Timestamp). This one is based on adding tag signature verification in src-d/go-git. Verify by taking everything apart Verify using src-d/go-git Git tags are signed similar to commits with small differences in their storage format. Like commit, which are stored in .git/objects/, tag are stored in .

go-git - Commit Timestamp

2 minute read Published:

This is related to the previous post, Git Commit Signature Verification. That post was based on the work of implementing git commit signature verification in src-d/go-git. This post is a sequel to that in a way. The previous post ended with an example of how to create a custom commit and run verification on it. ts := time.Unix(0000000000, 0) commit := &Commit{ Hash: plumbing.NewHash("8a9cea36fe052711fbc42b86e1f99a4fa0065deb"), Author: Signature{Name: "darkowlzz", Email: "example@darkowlzz.space", When: ts}, Committer: Signature{Name: "darkowlzz", Email: "example@darkowlzz.

go-git - Commit Signature Verification

6 minute read Published:

This post is about PGP signature verification of git commits. Verify by taking things apart Verify using git cli Verify using golang’s crypto/openpgp package Verify using src-d/go-git Git commits and any kind of data can be signed using GPG (GNU Privacy Guard) program, available at https://www.gnupg.org/. It implements the OpenPGP standard for encryption. 4 Things Data This is the data/content that is to be communicated or published and requires signing for verifiable authenticity.