GoLang Useful functions – package with all source code – US$ 35,00

After paying, please send an email to evandro@definitiva.com.br in order to receive this digital product above.

If you want to make a Wire Transfer, please send an email to evandro@definitiva.com.br and I will send my bank info

getexternalIP

return the External IP Address
getlocalIP
return the Local Network IP Address of the machine
dnsreturns the dns address
dhcpserverreturns the dhpserver address
gatewayreturns the gateway address
hostnamereturns the dhpserver address
usernamereturns the username logged in
diskdatareturn the disks data – total size, model, SSD or not SSD, free space
raminstalledram installed
ramavailableram available
processornameName of processor
processorcoresnumber of cores of the processor
cpuusagecpu usage – for example returns 88% – 88% of cpu is in use at the moment
networkdatanetwork board speed, cable connected, wifi connected, wifi networ name in use and speed
service_is_activereturn is service is active – for instance – spool is active ? vnc service is active ?
software_is_installedreturn if a software is installed – for instance – Excel is installed ?
windowsisupdatedreturn true if all windows updates are installed
windowsversionreturns the windows version
loglog text to file
todaydatereturn the today date
timenowreturn the time now
daysbetweenreturn the number of days between two dates
copyfilecopy one file to another name / location
deletefiledelete a file
fileexistreturn true if a file exist
arraytostringconvert array to string
takeoffhtmltake off html codes from a text
sendmailsend a mail with body, subject, and optional attachments, cc and bcc
istextinreturn if a some text is inside a bigger text – works with text with one line,text with multi lines and in arrays
repeatedtextreturn is some text or part of text is repeated
savetextinfilesave a string or text in a file
insertifnotexistinsert a text in a file, if the text does not exist yet
replacetextinfilereplace a text in a file(s)
removeblanklinesremove blank lines in a text
takeofflineespecify a text and the line with the text will be removed from the file
scoreprocessorreturns a number who indicates the compared scored of the processor – usefull to know if processor is fast or not
scanportreturn if a TCP or UDP port is opened
unzipunzip a file (uncompress a file)
zip zip a file (compress a file)
searchiteminlistsearch an item in a list
searchiteminarraysearch an item in an array
istextinfilereturn if a text is in a file
getlinefilespecify a word or text, and it will return the line(s) from file
getfullfileget the full text file content to a string
showfileprint the file contents
getlinestringspecify a word or text, and it will return the line(s) from string
sortlinessort lines
downloadfiledownload a file from a www or ftp address
uploadfileupload file to a ftp server
filesizereturn the file size
filedatereturn the file date
deletedirectorydelete a directory
createdirectorycreate a directory
directoryexistsreturn true if a directory exist
removespacesremove spaces from begin and/or end of strings
GetStringInBetweenfor instance , usefull to get the text between <title> and </title>
has a lot of another uses – to scrap files, etc
getfirstpartget first part – for instance
text content is “John^Julius^Brendon”
getfirstpart(text, “^”) returns John
getlastpartget last part – for instance
text content is “John^Julius^Brendon”
getlastpart(text, “^”) returns Brendon
getresultfor instance
text:
USERDOMAIN=company1
NUMBER_OF_PROCESSORS=16
USERNAME=Anna

getresult(“NUMBER_OF_PROCESSORS”) will return 16
convertfloattostringconvert float to string
convertstringtofloatconvert string to float
convertstringtointconvert string to int
convertstringtoint64convert string to int64
convertinttostringconvert int to string
converteint64parastringconvert int64 to string
getuptimereturn the uptime
lastbootreturn the last boot time
replacetextreplacetext(text,”JOHN”,”JOAO)

replaces John by Joao
takeofftexttakeoff(text,”JOHN”)

takeoff all the JOHN occurrences in the text
anykeypress any key to continue
inputfromkeyboardshows a message, wait for the user type the response, check if the response is valid
justpointandnumbersreturns just the point and numbers from a text
justnumbersandletters
returns just the numbers and letters from a text
formatteddatetimereturns the date and time in a formatted way – for instance YYYY/MM/DD HH:MM
formattedtimereturns the in a formatted way – for instance HH:MM
bytesdormattedreturns a formatted value in KB, MB, GB, TB, PB
for instance – 100000000
returns 100 MB
appendfileappend a text to the end of a file (creates the file if the file does not exist)
runcommandrun a shell comand
runcommandresultrun a shell command and return the result value
for instance:
runcommandresult(“cmd”, “wmic nicconfig get DNSServerSearchOrder”)
capturescreencapture the screen and save to file
pingping some address and return true or false
sleepsleep some seconds
endprogram end the golang program

Functions are in English and Portuguese

The functions are very well documented inside the golang program you will receive, but we also offer support in how to use the functions

If you want the functions in your language, we can provide to you.

If you want a new function or a new software, we can develop for you.

Also available Golang programming lessons and personalized programming lessions.