當前位置: 首頁>>代碼示例>>Golang>>正文


Golang LogString.AddS方法代碼示例

本文整理匯總了Golang中CitySourcedAPI/logs.LogString.AddS方法的典型用法代碼示例。如果您正苦於以下問題:Golang LogString.AddS方法的具體用法?Golang LogString.AddS怎麽用?Golang LogString.AddS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CitySourcedAPI/logs.LogString的用法示例。


在下文中一共展示了LogString.AddS方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: 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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:7,代碼來源:request.go

示例2: 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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:7,代碼來源:comments.go

示例3: 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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:7,代碼來源:vote.go

示例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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:8,代碼來源:comment.go

示例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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:8,代碼來源:update.go

示例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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:11,代碼來源:report.go

示例7: String

func (st GetReportsByAddress) String() string {
	ls := new(logs.LogString)
	ls.AddS("GetReportsByAddress\n")
	ls.AddS(st.Request.String())
	ls.AddF("Address \"%v\"\n", st.Address)
	ls.AddF("Radius %s/%v   MaxResults: %s/%v\n", st.Radius, st.radius, st.MaxResults, st.maxResults)
	ls.AddF("IncludeComments: %s/%v\n", st.IncludeComments, st.includeComments)
	ls.AddF("IncludeDetails: %v/%t\n", st.IncludeDetails, st.includeDetails)
	ls.AddF("Date Range: %v  to: %v \n", st.DateRangeStart, st.DateRangeEnd)
	return ls.Box(90)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:11,代碼來源:get.go

示例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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:15,代碼來源:create.go


注:本文中的CitySourcedAPI/logs.LogString.AddS方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。