Started the port from Python to Go

TODO: Want to depend on bytes instead of lines
Started the port from Python to Go