ietfrfc

package module
v1.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2024 License: BSD-2-Clause Imports: 7 Imported by: 0

README

ietfrfc

Go Reference

Go module for retrieving IETF RFCs, RFC documents contain technical specifications and organizational notes for the Internet.

How to use?

  1. Fetch the module with go get:
go get "github.com/TWolfis/ietfrfc"   
  1. Import the module in your code
import "github.com/TWolfis/ietfrfc"

RFC Index

IETF Source

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RFC

type RFC struct {
	Series       string `json:"series,omitempty"`
	Number       string `json:"number,omitempty"`
	Howpublished string `json:"howpublished,omitempty"`
	Publisher    string `json:"publisher,omitempty"`
	Doi          string `json:"doi,omitempty"`
	URL          string `json:"url,omitempty"`
	Author       string `json:"author,omitempty"`
	Title        string `json:"title,omitempty"`
	Pagetotal    string `json:"pagetotal,omitempty"`
	Year         string `json:"year,omitempty"`
	Month        string `json:"month,omitempty"`
	Day          string `json:"day,omitempty"`
	Abstract     string `json:"abstract,omitempty"`
	Body         string `json:"body,omitempty"`
}

rfc holds the text body of the requested RFC and the metadata concerning the RFC

func Get added in v1.3.0

func Get(Number int) (*RFC, error)

GetRFC fetches the RFC and RFC Metadata by number

Example
package main

import (
	"fmt"

	"github.com/TWolfis/ietfrfc"
)

func main() {
	number := 2328

	// Get
	rfc, err := ietfrfc.Get(number)
	if err != nil {
		fmt.Println(err)
		return
	}

	// Print RFC Body
	fmt.Println(rfc.Body)
}

func (*RFC) String

func (r *RFC) String() string

String prints out the RFC Body

Directories

Path Synopsis
cmd
rfetch command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL