// Generates the INFO to be sent to the client with the client ID included.
// info arg will be copied since passed by value.
// Assume lock is held.
322478
func (c *client) generateClientInfoJSON(info Info) []byte {
	info.CID = c.cid
	// Generate the info json
	b, _ := json.Marshal(info)
	pcs := [][]byte{[]byte("INFO"), b, []byte(CR_LF)}
	return bytes.Join(pcs, []byte(" "))
}
357650
func (c *Client) Generate(numBlocks uint32) ([]*chainhash.Hash, error) {
	return c.GenerateAsync(numBlocks).Receive()
}
522138
func (g *srvGateway) generateInfoJSON() {
	b, err := json.Marshal(g.info)
	if err != nil {
		panic(err)
	}
	g.infoJSON = []byte(fmt.Sprintf(InfoProto, b))
}
836810
func Info() echo.HandlerFunc {
	return func(c echo.Context) error {
		resp := oauth.NewResponse()
		defer resp.Close()

		if ir := oauth.HandleInfoRequest(resp, c.Request()); ir != nil {
			oauth.FinishInfoRequest(resp, c.Request(), ir)
		}

		return osin.OutputJSON(resp, c.Response(), c.Request())
	}
}
640267
func GenerateConnectionIDForInitial() (ConnectionID, error) {
	r := make([]byte, 1)
	if _, err := rand.Read(r); err != nil {
		return nil, err
	}
	len := MinConnectionIDLenInitial + int(r[0])%(maxConnectionIDLen-MinConnectionIDLenInitial+1)
	return GenerateConnectionID(len)
}
623306
func (c *syncClient) Info() (result map[string]string, err Error) {
	var resp Response
	resp, err = c.conn.ServiceRequest(&INFO, [][]byte{})
	if err == nil {
		result = parseInfo(resp.GetBulkData())
		//		infoStr := bytes.NewBuffer(resp.GetBulkData()).String();
		//		infoItems := strings.Split(infoStr, "\r\n", 0);
		//		result = make(map[string] string);
		//		for _, entry := range infoItems  {
		//			etuple := strings.Split(entry, ":", 2);
		//			result[etuple[0]] = etuple[1];
		//		}
	}
	return result, err
}
231763
func (c *UploadCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "attach-resource",
		Args:    "application name=file|OCI image",
		Purpose: "Update a resource for an application.",
		Doc:     attachDoc,
		Aliases: []string{"attach"},
	})
}
593008
func New(id string, client LockClient) (lock *Lock) {
	return &Lock{id, client}
}
843196
func Info(msg string, args ...interface{}) Response {
	return Response{
		Status:  StatusPass,
		Message: fmt.Sprintf(msg, args...),
	}
}
508340
func Info(id, description string, keysAndValues ...interface{}) {
	keysAndValues = append([]interface{}{"golog_id", id}, keysAndValues...)
	(DefaultLogger.(*logger)).info(1, description, keysAndValues...)
}
1038623
func (s *grpcAPIService) Info(ctx context.Context, req *InfoRequest) (*InfoResponse, error) {
	return s.api.Info(ctx, req), nil
}
1191863
func clientRequestID() string {
	msClientRequestIDOnce.Do(func() {
		var err error
		msClientRequestID, err = uuid.GenerateUUID()

		if err != nil {
			log.Printf("[WARN] Fail to generate uuid for msClientRequestID: %+v", err)
		}
	})

	log.Printf("[DEBUG] AzureRM Client Request Id: %s", msClientRequestID)
	return msClientRequestID
}
1104326
func GenerateClientCertificate() (*Certificate, error) {
	cert, key, err := shared.GenerateMemCert(true)
	if err != nil {
		return nil, errors.Trace(err)
	}
	return NewCertificate(cert, key), nil
}
233009
func (k *TUFKey) ID() string {
	if k.id == "" {
		pubK := TUFKey{
			Type: k.Algorithm(),
			Value: KeyPair{
				Public:  k.Public(),
				Private: nil,
			},
		}
		data, err := json.MarshalCanonical(&pubK)
		if err != nil {
			logrus.Error("Error generating key ID:", err)
		}
		digest := sha256.Sum256(data)
		k.id = hex.EncodeToString(digest[:])
	}
	return k.id
}
1063521
func (s *State) Lock(info *state.LockInfo) (string, error) {
	s.mu.Lock()
	defer s.mu.Unlock()

	if s.disableLocks {
		return "", nil
	}

	if c, ok := s.Client.(ClientLocker); ok {
		return c.Lock(info)
	}
	return "", nil
}
45586
func (c *trustCommand) Info() *cmd.Info {
	return jujucmd.Info(&cmd.Info{
		Name:    "trust",
		Args:    "<application name>",
		Purpose: trustSummary,
		Doc:     trustDetails,
	})
}
1093757
func (g *GRPCLogger) Info(args ...interface{}) {
	args = append([]interface{}{"[INFO] "}, args...)
	g.l.Print(args...)
}