Hacker News new | ask | show | jobs
by manucorporat 4014 days ago
cool! why and how are the Go methods called with camelcase names?

  var engine = gin.default();
  engine.get("/back", CandyJS.proxy(function(ctx) {
    var future = time.date(2015, 10, 21, 4, 29 ,0, 0, time.UTC);
    var now = time.now();

    ctx.json(200, {
      future: future.string(),
      now: now.string(),
      nsecs: future.sub(now)
    });
  }));
1 comments

the method and field names are converted to lowerCamelCase to be compliant with the JS coding style. Let's see if this transformation becomes a headache.

BTW this behaviour is undocumented, I will fix that.

got it!