Skip to content

Instantly share code, notes, and snippets.

@saginadir
Created April 11, 2017 20:48
Show Gist options
  • Save saginadir/6b34e44e6e0436908dab0c0558ef9f48 to your computer and use it in GitHub Desktop.
Save saginadir/6b34e44e6e0436908dab0c0558ef9f48 to your computer and use it in GitHub Desktop.
package replace_file_lines
import (
// ...
)
// Variables that begin with an uppercase is exposed
var PublicVariable int = 42
// While those that begin with loweracse are private to the module
var privateVariable int = 0
// Function that begins with an uppercase is exposed
func Replace(oldFilePath, outputFilePath, with, what string) {
// ...
}
// Function that begins with an uppercase is exposed
func PublicFunction(/* .. */) {
// ...
)
// While lowercase names makes functions private to the module
func privateFunction(/* .. */) {
// ...
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment