sourcegraph/gosyntect

Name: gosyntect

Owner: Sourcegraph

Description: Go HTTP client for syntect_server

Created: 2017-08-16 19:25:40.0

Updated: 2017-12-20 05:56:49.0

Pushed: 2017-08-24 00:43:13.0

Homepage: null

Size: 3

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

gosyntect

gosyntect is a Go HTTP client for syntect_server, a Rust HTTP server which syntax highlights code.

Installation
et -u github.com/sourcegraph/gosyntect/cmd/gosyntect
Usage
e: gosyntect <server> <theme> <file.go>

ple:
gosyntect http://localhost:8000 'InspiredGitHub' gosyntect.go
API
nt := gosyntect.New("http://localhost:8000")
, err := cl.Highlight(&gosyntect.Query{
Extension: "go",
Theme:     "InspiredGitHub",
Code:      string(theGoCode),

rr != nil {
log.Fatal(err)

Println(resp.Data) // prints highlighted HTML

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.