Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
|
Vadim Sh.
2014/10/21 15:26:59
You can probably remove hello_pkg and other tempor
| |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 1 package hello_pkg | 4 package hello_pkg |
| 2 | 5 |
| 3 import "fmt" | 6 import "fmt" |
| 4 import "code.google.com/p/goauth2/oauth" | 7 import "code.google.com/p/goauth2/oauth" |
| 5 | 8 |
| 6 // Demonstrate that third party package is usable. | 9 // Demonstrate that third party package is usable. |
| 7 var config = &oauth.Config{ | 10 var config = &oauth.Config{ |
| 8 ClientId: "123", | 11 ClientId: "123", |
| 9 ClientSecret: "456", | 12 ClientSecret: "456", |
| 10 Scope: "https://www.googleapis.com/auth/buzz", | 13 Scope: "https://www.googleapis.com/auth/buzz", |
| 11 AuthURL: "https://accounts.google.com/o/oauth2/auth", | 14 AuthURL: "https://accounts.google.com/o/oauth2/auth", |
| 12 TokenURL: "https://accounts.google.com/o/oauth2/token", | 15 TokenURL: "https://accounts.google.com/o/oauth2/token", |
| 13 RedirectURL: "http://you.example.org/handler", | 16 RedirectURL: "http://you.example.org/handler", |
| 14 } | 17 } |
| 15 | 18 |
| 16 func Greetings(text string) { | 19 func Greetings(text string) { |
| 17 fmt.Printf("%s, %v!\n", text, config) | 20 fmt.Printf("%s, %v!\n", text, config) |
| 18 } | 21 } |
| OLD | NEW |