-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
94 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,45 @@ | ||
package jaws | ||
|
||
import "io" | ||
import ( | ||
"io" | ||
"net/http" | ||
) | ||
|
||
type RequestWriter struct { | ||
*Request | ||
rq *Request | ||
io.Writer | ||
} | ||
|
||
func (rw RequestWriter) UI(ui UI, params ...interface{}) error { | ||
return rw.JawsRender(rw.NewElement(ui), rw.Writer, params) | ||
return rw.rq.JawsRender(rw.rq.NewElement(ui), rw.Writer, params) | ||
} | ||
|
||
// Request returns the current jaws.Request. | ||
func (rw RequestWriter) Request() *Request { | ||
return rw.rq | ||
} | ||
|
||
// Initial returns the initial http.Request. | ||
func (rw RequestWriter) Initial() *http.Request { | ||
return rw.Request().Initial | ||
} | ||
|
||
// HeadHTML outputs the HTML code needed in the HEAD section. | ||
func (rw RequestWriter) HeadHTML() error { | ||
return rw.Request().HeadHTML(rw) | ||
} | ||
|
||
// Session returns the Requests's Session, or nil. | ||
func (rw RequestWriter) Session() *Session { | ||
return rw.Request().Session() | ||
} | ||
|
||
// Get calls Request().Get() | ||
func (rw RequestWriter) Get(key string) (val interface{}) { | ||
return rw.Request().Get(key) | ||
} | ||
|
||
// Set calls Request().Set() | ||
func (rw RequestWriter) Set(key string, val interface{}) { | ||
rw.Request().Set(key, val) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.