Categorygithub.com/code-brew-lab/gonq
repository
1.0.1
Repository: https://github.com/code-brew-lab/gonq.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

Gonq

Gonq (Go Name Query) is a simple command-line application written in Go that mimics the functionality of the dig tool. It takes a domain name as input and returns the corresponding IP address. Gonq is designed to be lightweight and efficient, providing a quick and easy way to query domain names and retrieve their IP addresses.

Installation

CLI Tool

You can install the CLI tool using go install:

go install github.com/code-brew-lab/gonq/cmd/[email protected]

or you can compile it manually by using the Makefile. See Makefile for more details

make build

Go Module

To use the Go module in your project, import it as follows:

import "github.com/code-brew-lab/gonq/pkg/dns"

Usage

CLI Tool

Perform a DNS query by:

gonq -d google.com

Go Module

Example usage of go module:

package main

import (
    "log"
    "github.com/code-brew-lab/gonq/pkg/dns"
)

func main() {
    req, err := dns.NewRequest("1.1.1.1", 53)
    if err != nil {
        log.Fatalln(err)
    }

    req.AddQuery("google.com", dns.TypeA, dns.ClassINET)

    resp, err := req.Make()
    if err != nil {
        log.Fatalln(err)
    }
}

Documentation

Comprehensive documentation for the Go module is available at pkg.go.dev.

Feedback

Your feedback is important to us. If you encounter any issues or have suggestions for improvement, please open an issue on our GitHub repository.

Thank you for using gonq!