FAQ
Reviewers: golang-dev1,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/google-api-go-client/


Description:
gen: use rootUrl and servicePath to compute API base URL

  From Kostik Shtoyk (Google CLA)

Please review this at https://codereview.appspot.com/12741049/

Affected files:
    M CONTRIBUTORS
    M google-api-go-generator/gen.go


Index: CONTRIBUTORS
===================================================================
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -33,6 +33,7 @@

   Alain Vongsouvanhalainv <alainv@google.com>
   Andrew Gerrand <adg@golang.org>
+Kostik Shtoyk <kostik@google.com>
   Brad Fitzpatrick <bradfitz@golang.org>
   Francesc Campoy <campoy@golang.org>
   Garrick Evans <garrick@google.com>
Index: google-api-go-generator/gen.go
===================================================================
--- a/google-api-go-generator/gen.go
+++ b/google-api-go-generator/gen.go
@@ -51,6 +51,8 @@
    Version string `json:"version"`
    Title string `json:"title"`
    DiscoveryLink string `json:"discoveryLink"` // relative
+ RootURL string `json:"rootUrl"`
+ ServicePath string `json:"servicePath"`
    Preferred bool `json:"preferred"`

    m map[string]interface{}
@@ -305,6 +307,9 @@
   }

   func (a *API) apiBaseURL() string {
+ if a.RootURL != "" {
+ return a.RootURL + a.ServicePath
+ }
    return resolveRelative(*apisURL, jstr(a.m, "basePath"))
   }



--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Bradfitz at Aug 22, 2013 at 3:00 pm
    *** Submitted as
    https://code.google.com/p/google-api-go-client/source/detail?r=118991d3ddf4
    ***

    gen: use rootUrl and servicePath to compute API base URL

      From Kostik Shtoyk (Google CLA)

    R=golang-dev
    CC=golang-dev
    https://codereview.appspot.com/12741049


    https://codereview.appspot.com/12741049/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedAug 22, '13 at 2:58p
activeAug 22, '13 at 3:00p
posts2
users1
websitegolang.org

1 user in discussion

Bradfitz: 2 posts

People

Translate

site design / logo © 2022 Grokbase