本文整理匯總了Golang中CitySourcedAPI/logs.LogString.AddF方法的典型用法代碼示例。如果您正苦於以下問題:Golang LogString.AddF方法的具體用法?Golang LogString.AddF怎麽用?Golang LogString.AddF使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CitySourcedAPI/logs.LogString
的用法示例。
在下文中一共展示了LogString.AddF方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: String
func (st CreateReportVote) String() string {
ls := new(logs.LogString)
ls.AddS("CreateReportVote\n")
ls.AddS(st.Request.String())
ls.AddF("ID %s/%d\n", st.ReportID, st.reportID)
return ls.Box(90)
}
示例2: String
func (r Request) String() string {
ls := new(logs.LogString)
ls.AddS("Request_Type\n")
ls.AddF("Start: %v\n", r.start)
ls.AddF("Request - type: %s ver: %s\n", r.ApiRequestType, r.ApiRequestVersion)
return ls.BoxC(60)
}
示例3: String
func (c Comment) String() string {
ls := new(logs.LogString)
ls.AddS("Comment\n")
ls.AddF("ID: %d ReportID: %d Created: %v\n", c.ID, c.ReportID, c.DateCreated)
ls.AddF("%s\n", c.Comment)
return ls.BoxC(70)
}
示例4: String
func (st CreateReportComment) String() string {
ls := new(logs.LogString)
ls.AddS("CreateReportComment\n")
ls.AddS(st.Request.String())
ls.AddF("ID %s/%d\n", st.ReportID, st.reportID)
ls.AddF("Comment: %v\n", st.Comment)
return ls.Box(90)
}
示例5: String
func (st UpdateThreeOneOne) String() string {
ls := new(logs.LogString)
ls.AddS("UpdateThreeOneOne\n")
ls.AddS(st.Request.String())
ls.AddF("ID %s/%d\n", st.ReportID, st.reportID)
ls.AddF("SLA %q\n", st.TicketSLA)
return ls.Box(90)
}
示例6: String
// Displays the contents of the Spec_Type custom type.
func (r Report) String() string {
ls := new(logs.LogString)
ls.AddS("Report\n")
ls.AddF("ID: %v\n", r.ID)
ls.AddS(r.BaseReport.String())
for _, c := range r.Comments {
ls.AddF("%5d %20s %s\n", c.ID, c.DateCreated, c.Comment)
}
return ls.Box(90)
}
示例7: String
func (st GetReport) String() string {
ls := new(logs.LogString)
ls.AddS("GetReport\n")
ls.AddS(st.Request.String())
ls.AddF("ReportID: %q\n", st.ReportID)
ls.AddF("IncludeComments: %s/%v\n", st.IncludeComments, st.includeComments)
ls.AddF("IncludeDetails: %v/%t\n", st.IncludeDetails, st.includeDetails)
ls.AddF("IncludeVotes: %v/%t\n", st.IncludeVotes, st.includeVotes)
ls.AddF("Date Range: %v to: %v \n", st.DateRangeStart, st.DateRangeEnd)
return ls.Box(90)
}
示例8: String
func (s CreateThreeOneOne) String() string {
ls := new(logs.LogString)
ls.AddS("CreateThreeOneOne_Type\n")
ls.AddS(s.Request.String())
ls.AddF("DateCreated \"%v\"\n", s.DateCreated)
ls.AddF("Device - type %s model: %s Id: %s\n", s.DeviceType, s.DeviceModel, s.DeviceID)
ls.AddF("Request - type: %q id: %q\n", s.RequestType, s.RequestTypeID)
ls.AddF("Location - lat: %v lon: %v directionality: %q\n", s.Latitude, s.Longitude, s.Directionality)
ls.AddF("Description: %q\n", s.Description)
ls.AddF("Author(anon: %t) %s %s Email: %s Tel: %s\n", s.AuthorIsAnonymous, s.AuthorNameFirst, s.AuthorNameLast, s.AuthorEmail, s.AuthorTelephone)
for _, v := range s.KeyValuePairs {
ls.AddF(" %s: %s\n", v.Key, v.Value)
}
return ls.Box(90)
}
示例9: String
func (s CSSearchReport) String() string {
ls := new(logs.LogString)
ls.AddF("Report %d\n", s.ID)
ls.AddF("DateCreated \"%v\"\n", s.DateCreated)
ls.AddF("Device - type %s model: %s ID: %s\n", s.DeviceType, s.DeviceModel, s.DeviceID)
ls.AddF("Request - type: %q id: %q\n", s.RequestType, s.RequestTypeID)
ls.AddF("Location - lat: %v lon: %v directionality: %q\n", s.Latitude, s.Longitude, s.Directionality)
ls.AddF(" %s, %s %s\n", s.City, s.State, s.ZipCode)
ls.AddF("Votes: %d\n", s.Votes)
ls.AddF("Description: %q\n", s.Description)
ls.AddF("Images - std: %s\n", s.ImageURL)
if len(s.ImageURLXs) > 0 {
ls.AddF(" XS: %s\n", s.ImageURLXs)
}
if len(s.ImageURLSm) > 0 {
ls.AddF(" SM: %s\n", s.ImageURLSm)
}
if len(s.ImageURLMd) > 0 {
ls.AddF(" XS: %s\n", s.ImageURLMd)
}
if len(s.ImageURLLg) > 0 {
ls.AddF(" XS: %s\n", s.ImageURLLg)
}
if len(s.ImageURLXl) > 0 {
ls.AddF(" XS: %s\n", s.ImageURLXl)
}
ls.AddF("Author(anon: %v) %s %s Email: %s Tel: %s\n", s.AuthorIsAnonymous, s.AuthorNameFirst, s.AuthorNameLast, s.AuthorEmail, s.AuthorTelephone)
ls.AddF("SLA: %s\n", s.TicketSLA)
return ls.Box(80)
}