I am new to Go Lang World and currently converting a python code to golang
**Below is the python setup script **
import subprocess
import setup, Extension
class buildallC(Command):
def run(self):
print(“Running all C files”)
subprocess.call([‘gmake’, ‘-C’, ‘network-anomaly/Make/gcc’])
subprocess.call([‘gmake’, ‘-C’, ‘network-interface/Make/gcc’])
pynetwork = Extension(manifest.pynetwork, [ ‘pynetwork/pynetwork.cpp, pynetwork/checknetwork.cpp,],
libs=[‘gnutls’],
mydirs = [‘pynetwork’,’network-anomaly/include’,‘network interface/include’,’/usr/local/include’],
thecc=[‘network-anomaly/Make/gcc/lib/libnetwork-anomaly.a’,'network-interface/Make/gcc/lib/libnetwork-interface.a’]
setup(
name=‘SampleTest’,
version=‘2.0’,
packages=[‘SampleTest’],
ext_modules=[pynetwork],
class={
‘buildcprog’: buildallC,
}
)
Execution: python setup.py buildcprog
How to execute this portion in Go ?
subprocess.call([‘gmake’, ‘-C’, ‘network-anomaly/Make/gcc’])
subprocess.call([‘gmake’, ‘-C’, ‘network-interface/Make/gcc’])
pynetwork = Extension(manifest.pynetwork, [ ‘pynetwork/pynetwork.cpp, …