Skip to content

futurenda/fossil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fossil

Convert text files to Go Constants.

See Design.md

Usage

tree input

input
└── sql
    ├── delete.sql
    ├── select.sql
    ├── sub
    │   └── insert.sql
    └── update.sql
fossil build input -o output
tree output

output
└── sql
    ├── delete.sql.go
    ├── select.sql.go
    ├── sub
    │   └── insert.sql.go
    └── update.sql.go
package main

import (
	sqlFiles "github.com/futurenda/fossil/examples/output/sql"
	sqlSubFiles "github.com/futurenda/fossil/examples/output/sql/sub"

	"database/sql"
)

func run(db *sql.DB) {
	db.Exec(sqlFiles.Delete, 1, 2)
	db.Exec(sqlSubFiles.Insert, 1, 2)
}

About

Embedding text file into compiled executable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages