Categorygithub.com/mbleigh/opengraph
modulepackage
1.0.0
Repository: https://github.com/mbleigh/opengraph.git
Documentation: pkg.go.dev

# README

Open Graph Parser for Golang

Build Status GoDoc

Code Example

package main

import (
	"fmt"
	"github.com/otiai10/opengraph"
)

func main() {
	og, err := opengraph.Fetch("http://github.com/otiai10/too")
	fmt.Printf("OpenGraph: %+v\nError: %v\n", og, err)
}

cli as a working example

% go get github.com/otiai10/opengraph/ogp
% ogp --help

For more details, see ogp/main.go.

advanced

# Packages

No description provided by the author

# Functions

Fetch creates and parses OpenGraph with specified URL.
LinkTag constructs Link.
MetaTag constructs MetaTag.
New creates new OpenGraph struct with specified URL.
TitleTag constructs Title.

# Structs

Link represents any "<link ...>" HTML tag.
Meta represents any "<meta ...>" HTML tag.
OGAudio represents "og:audio" structure.
OGImage represents "og:image" structure.
OGVideo represents "og:video" structure.
OpenGraph represents web page information according to OGP <ogp.me>, and some more additional informations like URL.Host and so.
Title represents any "<title ...>" HTML tag.
URL includes *url.URL.