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


Golang logs.LogString類代碼示例

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


在下文中一共展示了LogString類的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)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:7,代碼來源:vote.go

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

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

示例4: 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

示例5: String

// Displays the contents of the Spec_Type custom type.
func (s BaseReport) String() string {
	ls := new(logs.LogString)
	ls.AddS("Base Report\n")
	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.LatitudeV, s.LongitudeV, s.Directionality)
	ls.AddF("          %s, %s   %s\n", s.City, s.State, s.ZipCode)
	ls.AddF("Votes: %d\n", s.VotesV)
	ls.AddF("Description: %q\n", s.Description)
	ls.AddF("Images - std: %s\n", s.ImageUrl)
	ls.AddF("          XS: %s\n", s.ImageUrlXs)
	ls.AddF("          SM: %s\n", s.ImageUrlSm)
	ls.AddF("          MD: %s\n", s.ImageUrlMd)
	ls.AddF("          LG: %s\n", s.ImageUrlLg)
	ls.AddF("          XL: %s\n", s.ImageUrlXl)
	ls.AddF("Author(anon: %t) %s %s  Email: %s  Tel: %s\n", s.AuthorIsAnonymousV, s.AuthorNameFirst, s.AuthorNameLast, s.AuthorEmail, s.AuthorTelephone)
	ls.AddF("SLA: %s\n", s.TicketSLA)
	return ls.Box(80)
}
開發者ID:codeforsanjose,項目名稱:citysourced-api-simulator,代碼行數:21,代碼來源:report.go

示例6: 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)
}
開發者ID:radhikapc,項目名稱:open311_gateway,代碼行數:30,代碼來源:search.go

示例7: 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

示例8: 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

示例9: 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


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