statik

package
v0.0.0-...-ff0caf4 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 1 Imported by: 1

README

The statik.go file contains the SwaggerUI, all of the dependencies and requirements.

For some reason if you need to recreate it, do the following steps:

  1. Downloading SwaggerUI files SwaggerUI can be downloaded from their GitHub Repo. Once downloaded, place the dist folder into this folder. Inside index.html change URL to ./swagger.yaml

  2. Compile the files to a binary For this step, install statik from https://github.com/rakyll/statik then run the following command:

statik -src={PATH_TO_THIS_FOLDER}/projects/src/github.com/gig/go-swagger-ui/dist

A new folder statik will be created, and inside a single go file, statik.go. ( It’s unreadable, so don’t bother with that. ) Copy the statik.go to this directory and remove the rest of the files.

Credits: https://medium.com/@ribice/serve-swaggerui-within-your-golang-application-5486748a5ed4

Documentation

Overview

Package statik contains static assets.

Jump to

Keyboard shortcuts

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