Skip to content

Include Code is a Go library for seamlessly embedding the contents of one file into another at designated comment markers.

License

Notifications You must be signed in to change notification settings

jempe/include_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Include Code

Small library to insert code of certain file in another file.

Description

include_code is a Go library that allows you to include the content of one file into another file at specified locations. It searches for specific comment markers and replaces them with the content of the specified file.

Usage

To use include_code, run the following command:

include_code <file>

Example

Consider you have the following content in main_file.js:

//This is the main file.
/*--include:include_file.js:--*/
/*--includeend--*/
//This is after the included file.

And the content of include_file.js is:

//This is the content of the included file.

After running:

include_code main_file.txt

The main_file.js will be transformed into:

//This is the main file.
/*--include:include_file.js:--*/
//This is the content of the included file.
/*--includeend--*/
//This is after the included file.

Installation

To install the include_code library, use the following command:

go install github.com/jempe/include_code

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or additions.

License

This project is licensed under the Apache 2.0 License.

About

Include Code is a Go library for seamlessly embedding the contents of one file into another at designated comment markers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages