// GenNextURL 生成安全编码后的下一步网址
359655
func (c *Context) GenNextURL(u string) string {
	if len(u) == 0 {
		return ``
	}
	if u[0] == '!' {
		return u
	}
	u = com.SafeBase64Encode(u)
	return `!` + u
}
943953
func (mad MaterialAttributesDependency) GenerateGeneric() (ma map[string]interface{}) {
	ma = make(map[string]interface{})
	if mad.Name != "" {
		ma["name"] = mad.Name
	}

	if mad.Pipeline != "" {
		ma["pipeline"] = mad.Pipeline
	}

	if mad.Stage != "" {
		ma["stage"] = mad.Stage
	}

	if mad.AutoUpdate {
		ma["auto_update"] = mad.AutoUpdate
	}
	return
}
70125
func (r *Repository) GetCloneURL() string {
	if r == nil || r.CloneURL == nil {
		return ""
	}
	return *r.CloneURL
}
1225519
func NewNexter(opts ...NexterOption) *Nexter {
	var id uint64
	n := &Nexter{
		id: &id,
	}
	for _, opt := range opts {
		opt(n)
	}
	return n
}
772944
func (d Datastore) NewURL(path string) *url.URL {
	u := d.c.URL()

	return &url.URL{
		Scheme: u.Scheme,
		Host:   u.Host,
		Path:   fmt.Sprintf("/folder/%s", path),
		RawQuery: url.Values{
			"dcPath": []string{d.DatacenterPath},
			"dsName": []string{d.Name()},
		}.Encode(),
	}
}
1022453
func NewDexRewriteURLRoundTripper(dexServerAddr string, T http.RoundTripper) DexRewriteURLRoundTripper {
	dexURL, _ := url.Parse(dexServerAddr)
	return DexRewriteURLRoundTripper{
		DexURL: dexURL,
		T:      T,
	}
}
113445
func (mbs maybeSources) getURL() string {
	strslice := make([]string, 0, len(mbs))
	for _, mb := range mbs {
		strslice = append(strslice, mb.getURL())
	}
	return strings.Join(strslice, "\n")
}
1345042
func (l *Lexer) consumeRemnantsBadURL() {
	for {
		if l.consumeByte(')') || l.r.Err() != nil {
			break
		} else if !l.consumeEscape() {
			l.r.Move(1)
		}
	}
}
941000
func ParseProxyURL(proxy string) (*url.URL, error) {
	proxyURL, err := url.Parse(proxy)

	// logic copied from net/http.ProxyFromEnvironment
	if err != nil || !strings.HasPrefix(proxyURL.Scheme, "http") {
		// proxy was bogus. Try prepending "http://" to it and see if that
		// parses correctly. If not, we fall through and complain about the
		// original one.
		if proxyURL, err := url.Parse("http://" + proxy); err == nil {
			return proxyURL, nil
		}
	}

	return proxyURL, err
}
994119
func NewProxy(target *url.URL) *WebsocketProxy {
	backend := func(r *http.Request) *url.URL {
		// Shallow copy
		u := *target
		u.Fragment = r.URL.Fragment
		u.Path = r.URL.Path
		u.RawQuery = r.URL.RawQuery
		return &u
	}
	return &WebsocketProxy{Backend: backend}
}
874097
func (cfg *leafNodeCfg) getCurrentURL() *url.URL {
	cfg.RLock()
	defer cfg.RUnlock()
	return cfg.curURL
}
979331
func (s *IndicesRolloverService) buildURL() (string, url.Values, error) {
	// Build URL
	var err error
	var path string
	if s.newIndex != "" {
		path, err = uritemplates.Expand("/{alias}/_rollover/{new_index}", map[string]string{
			"alias":     s.alias,
			"new_index": s.newIndex,
		})
	} else {
		path, err = uritemplates.Expand("/{alias}/_rollover", map[string]string{
			"alias": s.alias,
		})
	}
	if err != nil {
		return "", url.Values{}, err
	}

	// Add query string parameters
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", "true")
	}
	if s.dryRun {
		params.Set("dry_run", "true")
	}
	if s.masterTimeout != "" {
		params.Set("master_timeout", s.masterTimeout)
	}
	if s.timeout != "" {
		params.Set("timeout", s.timeout)
	}
	if s.waitForActiveShards != "" {
		params.Set("wait_for_active_shards", s.waitForActiveShards)
	}
	return path, params, nil
}
165296
func (client *MyInventoryClient) NewWithURL(url string) *MyInventoryClient {
  client.Enabled = true
  client.ServiceBaseURL = url
  return client
}
325232
func OneGenOf(gens ...gopter.Gen) gopter.Gen {
	if len(gens) == 0 {
		return Fail(reflect.TypeOf(nil))
	}
	return func(genParams *gopter.GenParameters) *gopter.GenResult {
		idx := genParams.Rng.Intn(len(gens))
		return gens[idx](genParams)
	}
}
1015598
func (s *ReindexService) buildURL() (string, url.Values, error) {
	// Build URL path
	path := "/_reindex"

	// Add query string parameters
	params := url.Values{}
	if s.pretty {
		params.Set("pretty", "true")
	}
	if s.refresh != "" {
		params.Set("refresh", s.refresh)
	}
	if s.timeout != "" {
		params.Set("timeout", s.timeout)
	}
	if s.requestsPerSecond != nil {
		params.Set("requests_per_second", fmt.Sprintf("%v", *s.requestsPerSecond))
	}
	if s.slices != nil {
		params.Set("slices", fmt.Sprintf("%v", s.slices))
	}
	if s.waitForActiveShards != "" {
		params.Set("wait_for_active_shards", s.waitForActiveShards)
	}
	if s.waitForCompletion != nil {
		params.Set("wait_for_completion", fmt.Sprintf("%v", *s.waitForCompletion))
	}
	return path, params, nil
}
66758
func (mhg MaterialAttributesHg) GenerateGeneric() (ma map[string]interface{}) {
	ma = map[string]interface{}{
		"auto_update":   mhg.AutoUpdate,
		"destination":   mhg.Destination,
		"invert_filter": mhg.InvertFilter,
		"name":          mhg.Name,
		"url":           mhg.URL,
	}

	if f := mhg.Filter.GenerateGeneric(); f != nil {
		ma["filter"] = f
	}
	return
}
1313167
func (tm *transactionManager) genIndexKey(queryType, address string) string {
	return strings.Join([]string{queryType, address}, ":")
}