Skip to content

Instantly share code, notes, and snippets.

@changtimwu
Last active August 29, 2015 14:06
Show Gist options
  • Save changtimwu/baab0ee584f924542861 to your computer and use it in GitHub Desktop.
Save changtimwu/baab0ee584f924542861 to your computer and use it in GitHub Desktop.
swixcli to go

based on

Tasks

  • call back function in GO
  • rewrite cli.coffee

node builtin

  • Buffer
    • cli_mac.coffee -- could be replaced by implementing macaddr_equal( s1, s2)
    • cli.coffee -- keystroke byte storage
  • msgagent
    • interface{} <-> otto Object
      • via encoding/json + vm.Run ?
      • via ToValue + Export?
    • send
    • on
  • process
    • process.env
    • process.stdin
    • process.stdout
    • process.exit

otto runnable modules( to be verified)

  • mycommon
  • underscore
  • underscore.string

modules to be implemented in GO

  • readline
  • tty
  • url
  • exec
@changtimwu
Copy link
Author

grep --no-filename require  cli*.coffee   | sort | uniq                       
Agent = require("smith").Agent
exec = require("child_process").exec  
fs= require 'fs'  
_.mixin( require './mycommon') 
_.mixin( require 'underscore.string')    
net = require("net")  
readline = require("readline") 
_ = require 'underscore'                                              
tty = require("tty")                                                        
url = require('url')                                                         
yaml = require 'yamljs'       

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment