Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Proxy Pattern 馃帀 #12

wants to merge 1 commit into
base: master
Changes from all commits
File filter...
Filter file types
Jump to鈥
Jump to file or symbol
Failed to load files and symbols.


Just for now

@@ -0,0 +1,29 @@
package patterns

import (

// Renderer interface
type Renderer interface {

// ReactRenderer struct
type ReactRenderer struct{}

// Render method on ReactRenderer struct
func (rr *ReactRenderer) Render() {
fmt.Println("I am React")

// RendererProxy struct
type RendererProxy struct {
renderer Renderer

// Render method on RendererProxy struct
func (rp *RendererProxy) Render() {
fmt.Println("I'm checking ya...")
@@ -0,0 +1,13 @@
package patterns

func ExampleRendererProxy() {
renderProxy := &RendererProxy{
renderer: &ReactRenderer{},


// I'mchecking ya...
// I am React
ProTip! Use n and p to navigate between commits in a pull request.
You can鈥檛 perform that action at this time.