readmode

package module
v0.0.0-...-8251079 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: MIT Imports: 10 Imported by: 0

README

go-readmode

Package readmode tools for working with readmode-css, for the Go programming language.

Documention

Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-readmode

GoDoc

How To Use

The content of the readmode.css is contained in the variable readmode.CSS

You would likely somehow return this from an http.Handler when the correct path is requested.

For example:

import "github.com/reiver/go-readmode"

func serveHTTP(responseWriter http.ResponseWriter, request *http.Request) {
	responseWriter.Header().Add("Content-Type", "text/css")
	io.WriteString(responseWriter, readmode.CSS)
}

Or, you could just use readmode.HTTPHandler:

handler = readmode.HTTPHandler(httphandler, "/css/readmode.css")

Import

To import package readmode use import code like the following:

import "github.com/reiver/go-readmode"

Installation

To install package readmode do the following:

GOPROXY=direct go get github.com/reiver/go-readmode

Author

Package readmode was written by Charles Iliya Krempeaux

Documentation

Index

Constants

View Source
const (
	PathDir = "/__readmode"
	PathCSS = PathDir + "/" + "readmode.css"
)

Variables

Functions

func HTTPHandler

func HTTPHandler(subHandler http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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