GoFiles

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

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 2 Imported by: 3

README

GoFiles cover.run

GoFiles is an open source Golang compiler with it's virtual structure library that compiles non-go files on the binary file, written by Fris.

Documentations

It can be found here GoFiles Docs.

Requirements

  • Go version >= 1.10.
  • Follow the installation instructions before compiling.

Installation

go get github.com/OGFris/GoFiles
cd $HOME/go/src/github.com/OGFris/GoFiles/compiler && go install

Compilation

After you've done the installation, simply enter your go project directory and compile it using the command:

compiler build ./

License

GoFiles is under the MIT License.

MIT License

Copyright (c) 2018 Fris

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	Name     string `json:"name"`
	Path     string `json:"path"`
	Contents string `json:"contents"`
}

func NewFile

func NewFile(path string) *File

NewFile Creates a new File instance.

func (*File) Host

func (f *File) Host(private bool, contentType string)

Host adds the file to the http server.

func (*File) Hosted

func (f *File) Hosted() bool

Hosted gives a boolean whether the file is hosted on the http server or not.

func (*File) SetContents

func (f *File) SetContents(content string) *File

SetContent sets the content of the virtual file. Don't recommend using it because trying to edit a virtually compiled file is pointless.

func (*File) Url

func (f *File) Url() string

Url gives the http url for the file.

type Folder

type Folder struct {
	Path    string   `json:"path"`
	Files   []File   `json:"files"`
	Folders []Folder `json:"folders"`
}

func NewFolder

func NewFolder(path string) *Folder

NewFolder Creates a new Folder instance.

func (*Folder) AddFile

func (f *Folder) AddFile(file File)

AddFile adds a virtual file to your Folder. Shouldn't be used unless you know what you're doing.

func (*Folder) AddFolder

func (f *Folder) AddFolder(fadd Folder)

AddFolder adds a virtual folder to your Folder. Shouldn't be used unless you know what you're doing.

func (*Folder) SetFolder

func (f *Folder) SetFolder(folder string) *Folder

SetFolder is a function ran by the compiler. Shouldn't be used unless you know what you're doing.

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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