I have project which is made for cross platform support
so I am making use of build tags
I have one file in which only one costant variable name changes like and methods remain same for linux and windows
right now I am duplicating the code for both linux and windows and llinux I need some suggestion or help in refactoring this code
I have code like below
file_linux:
const logfile = "/opt/a/b/c/abc.txt"
func print(){
fmt.print(logfile)
}
file_windows:
const logfile = "C:\\a\\Amazon\\b\\c\\abc.txt"
func print(){
fmt.print(logfile)
}