include_code

command module
v0.0.0-...-742cfcd Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

README

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@latest

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.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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